org.apache.activemq.broker.Broker.removeSession()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.apache.activemq.broker.Broker.removeSession()方法的一些代码示例,展示了Broker.removeSession()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.removeSession()方法的具体详情如下:
包路径:org.apache.activemq.broker.Broker
类名称:Broker
方法名:removeSession

Broker.removeSession介绍

[英]Removes a session.
[中]删除会话。

代码示例

代码示例来源:origin: apache/activemq

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
  Broker brokers[] = getListeners();
  for (int i = 0; i < brokers.length; i++) {
    brokers[i].removeSession(context, info);
  }
}

代码示例来源:origin: apache/activemq

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  getNext().removeSession(context, info);
}

代码示例来源:origin: apache/activemq

@Override
public Response processAddSession(SessionInfo info) throws Exception {
  ConnectionId connectionId = info.getSessionId().getParentId();
  TransportConnectionState cs = lookupConnectionState(connectionId);
  // Avoid replaying dup commands
  if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
    broker.addSession(cs.getContext(), info);
    try {
      cs.addSession(info);
    } catch (IllegalStateException e) {
      LOG.warn("Failed to add session: {}", info.getSessionId(), e);
      broker.removeSession(cs.getContext(), info);
    }
  }
  return null;
}

代码示例来源:origin: apache/activemq

broker.removeSession(cs.getContext(), session.getInfo());
return null;

代码示例来源:origin: pierre/meteo

public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
}

代码示例来源:origin: org.apache.activemq/activemq-broker

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
  Broker brokers[] = getListeners();
  for (int i = 0; i < brokers.length; i++) {
    brokers[i].removeSession(context, info);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
  Broker brokers[] = getListeners();
  for (int i = 0; i < brokers.length; i++) {
    brokers[i].removeSession(context, info);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
  Broker brokers[] = getListeners();
  for (int i = 0; i < brokers.length; i++) {
    brokers[i].removeSession(context, info);
  }
}

代码示例来源:origin: pierre/meteo

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  next.removeSession(context, info);
  Broker brokers[] = getListeners();
  for (int i = 0; i < brokers.length; i++) {
    brokers[i].removeSession(context, info);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-broker

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  getNext().removeSession(context, info);
}

代码示例来源:origin: org.apache.activemq/activemq-all

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  getNext().removeSession(context, info);
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

@Override
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  getNext().removeSession(context, info);
}

代码示例来源:origin: pierre/meteo

public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
  getNext().removeSession(context, info);
}

代码示例来源:origin: pierre/meteo

public Response processAddSession(SessionInfo info) throws Exception {
  ConnectionId connectionId = info.getSessionId().getParentId();
  TransportConnectionState cs = lookupConnectionState(connectionId);
  // Avoid replaying dup commands
  if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
    broker.addSession(cs.getContext(), info);
    try {
      cs.addSession(info);
    } catch (IllegalStateException e) {
      e.printStackTrace();
      broker.removeSession(cs.getContext(), info);
    }
  }
  return null;
}

代码示例来源:origin: org.apache.activemq/activemq-broker

@Override
public Response processAddSession(SessionInfo info) throws Exception {
  ConnectionId connectionId = info.getSessionId().getParentId();
  TransportConnectionState cs = lookupConnectionState(connectionId);
  // Avoid replaying dup commands
  if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
    broker.addSession(cs.getContext(), info);
    try {
      cs.addSession(info);
    } catch (IllegalStateException e) {
      LOG.warn("Failed to add session: {}", info.getSessionId(), e);
      broker.removeSession(cs.getContext(), info);
    }
  }
  return null;
}

代码示例来源:origin: org.apache.activemq/activemq-all

@Override
public Response processAddSession(SessionInfo info) throws Exception {
  ConnectionId connectionId = info.getSessionId().getParentId();
  TransportConnectionState cs = lookupConnectionState(connectionId);
  // Avoid replaying dup commands
  if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
    broker.addSession(cs.getContext(), info);
    try {
      cs.addSession(info);
    } catch (IllegalStateException e) {
      LOG.warn("Failed to add session: {}", info.getSessionId(), e);
      broker.removeSession(cs.getContext(), info);
    }
  }
  return null;
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

@Override
public Response processAddSession(SessionInfo info) throws Exception {
  ConnectionId connectionId = info.getSessionId().getParentId();
  TransportConnectionState cs = lookupConnectionState(connectionId);
  // Avoid replaying dup commands
  if (cs != null && !cs.getSessionIds().contains(info.getSessionId())) {
    broker.addSession(cs.getContext(), info);
    try {
      cs.addSession(info);
    } catch (IllegalStateException e) {
      LOG.warn("Failed to add session: {}", info.getSessionId(), e);
      broker.removeSession(cs.getContext(), info);
    }
  }
  return null;
}

代码示例来源:origin: org.apache.activemq/activemq-broker

broker.removeSession(cs.getContext(), session.getInfo());
return null;

代码示例来源:origin: org.apache.activemq/activemq-all

broker.removeSession(cs.getContext(), session.getInfo());
return null;

代码示例来源:origin: org.apache.activemq/activemq-osgi

broker.removeSession(cs.getContext(), session.getInfo());
return null;

相关文章

微信公众号

最新文章

更多

Broker类方法