From 1fee539de064759dee7272156e5ee21434fa3949 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Thu, 18 Jan 2007 14:43:10 +0000 Subject: Client: added request and response managers for channel 0 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497450 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/client/protocol/AMQProtocolSession.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java') diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java index 609da9a05e..e59b528e8b 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java @@ -114,6 +114,10 @@ public class AMQProtocolSession implements AMQProtocolWriter, ProtocolVersionLis _protocolHandler = null; _minaProtocolSession = null; _stateManager = new AMQStateManager(this); + + // Add channel 0 request and response managers, since they will not be added through the usual mechanism + _channelId2RequestMgrMap.put(0, new RequestManager(0, this)); + _channelId2ResponseMgrMap.put(0, new ResponseManager(0, _stateManager, this)); } public AMQProtocolSession(AMQProtocolHandler protocolHandler, IoSession protocolSession, AMQConnection connection) @@ -123,6 +127,10 @@ public class AMQProtocolSession implements AMQProtocolWriter, ProtocolVersionLis // properties of the connection are made available to the event handlers _minaProtocolSession.setAttribute(AMQ_CONNECTION, connection); _stateManager = new AMQStateManager(this); + + // Add channel 0 request and response managers, since they will not be added through the usual mechanism + _channelId2RequestMgrMap.put(0, new RequestManager(0, this)); + _channelId2ResponseMgrMap.put(0, new ResponseManager(0, _stateManager, this)); } public AMQProtocolSession(AMQProtocolHandler protocolHandler, IoSession protocolSession, AMQConnection connection, AMQStateManager stateManager) @@ -135,6 +143,9 @@ public class AMQProtocolSession implements AMQProtocolWriter, ProtocolVersionLis _stateManager = stateManager; _stateManager.setProtocolSession(this); + // Add channel 0 request and response managers, since they will not be added through the usual mechanism + _channelId2RequestMgrMap.put(0, new RequestManager(0, this)); + _channelId2ResponseMgrMap.put(0, new ResponseManager(0, _stateManager, this)); } public void init() -- cgit v1.2.1