本文整理了Java中org.apache.activemq.broker.Broker.addSession()
方法的一些代码示例,展示了Broker.addSession()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.addSession()
方法的具体详情如下:
包路径:org.apache.activemq.broker.Broker
类名称:Broker
方法名:addSession
[英]Adds a session.
[中]添加一个会话。
代码示例来源:origin: apache/activemq
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].addSession(context, info);
}
}
代码示例来源:origin: apache/activemq
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
getNext().addSession(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: pierre/meteo
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].addSession(context, info);
}
}
代码示例来源:origin: pierre/meteo
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].addSession(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].addSession(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
next.addSession(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].addSession(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
getNext().addSession(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
getNext().addSession(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
getNext().addSession(context, info);
}
代码示例来源:origin: pierre/meteo
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
getNext().addSession(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-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-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-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;
}
内容来源于网络,如有侵权,请联系作者删除!