diff options
Diffstat (limited to 'java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java')
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java b/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java index 6067e2fce5..e6395e5a28 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java +++ b/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java @@ -22,21 +22,19 @@ package org.apache.qpid.framing; import org.apache.log4j.Logger; import org.apache.mina.common.ByteBuffer; -import org.apache.qpid.protocol.AMQVersionAwareProtocolSession; -public class AMQMethodBodyFactory implements BodyFactory +public class AMQMethodBodyFactory implements BodyFactory, ProtocolVersionList { private static final Logger _log = Logger.getLogger(AMQMethodBodyFactory.class); - private final AMQVersionAwareProtocolSession _protocolSession; + VersionSpecificRegistry _registry = MainRegistry.getVersionSpecificRegistry(pv[pv.length-1][PROTOCOL_MAJOR],pv[pv.length-1][PROTOCOL_MINOR]); - public AMQMethodBodyFactory(AMQVersionAwareProtocolSession protocolSession) + public AMQMethodBodyFactory() { - _protocolSession = protocolSession; } public AMQMethodBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException { - return _protocolSession.getRegistry().get((short)in.getUnsignedShort(), (short)in.getUnsignedShort(), in, bodySize); + return _registry.get((short)in.getUnsignedShort(), (short)in.getUnsignedShort(), in, bodySize); } } |