diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-10-03 17:40:59 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-10-03 17:40:59 +0000 |
| commit | 146fcaecb92b7579fa6927dceecfe32ab92378c4 (patch) | |
| tree | 71d5b853a009f3462667049af5b0742b696cad9d /java/client | |
| parent | 49947bf1e2369fc1a989139f30885599c348466a (diff) | |
| download | qpid-python-146fcaecb92b7579fa6927dceecfe32ab92378c4.tar.gz | |
More refactoring
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-6125-ProtocolRefactoring@1629270 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
3 files changed, 6 insertions, 7 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java index 4dcd5a2e44..69d02566bf 100644 --- a/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java +++ b/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java @@ -216,7 +216,7 @@ public class BasicMessageProducer_0_8 extends BasicMessageProducer AMQFrame contentHeaderFrame = ContentHeaderBody.createAMQFrame(getChannelId(), - classIfForBasic, 0, contentHeaderProperties, size); + contentHeaderProperties, size); if(contentHeaderFrame.getSize() > getSession().getAMQConnection().getMaximumFrameSize()) { throw new JMSException("Unable to send message as the headers are too large (" diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java index 78f6273db8..0bf83fe301 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java @@ -193,7 +193,7 @@ public class AMQProtocolHandler implements ProtocolEngine _connection = con; _protocolSession = new AMQProtocolSession(this, _connection); _stateManager = new AMQStateManager(_protocolSession); - _decoder = new AMQDecoder(false, _protocolSession); + _decoder = new AMQDecoder(false, _protocolSession.getMethodRegistry()); _failoverHandler = new FailoverHandler(this); } 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 89bf684b3d..8a16c1c8a5 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 @@ -47,7 +47,6 @@ import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.HeartbeatBody; import org.apache.qpid.framing.MethodDispatcher; import org.apache.qpid.framing.MethodRegistry; -import org.apache.qpid.framing.MethodRegistrySource; import org.apache.qpid.framing.ProtocolInitiation; import org.apache.qpid.framing.ProtocolVersion; import org.apache.qpid.protocol.AMQConstant; @@ -61,7 +60,7 @@ import org.apache.qpid.transport.TransportException; * <p> * The underlying protocol session is still available but clients should not use it to obtain session attributes. */ -public class AMQProtocolSession implements AMQVersionAwareProtocolSession, MethodRegistrySource +public class AMQProtocolSession implements AMQVersionAwareProtocolSession { protected static final int LAST_WRITE_FUTURE_JOIN_TIMEOUT = 1000 * 60 * 2; @@ -89,8 +88,8 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession, Metho private ProtocolVersion _protocolVersion; - private MethodRegistry _methodRegistry = - MethodRegistry.getMethodRegistry(ProtocolVersion.getLatestSupportedVersion()); + private final MethodRegistry _methodRegistry = + new MethodRegistry(ProtocolVersion.getLatestSupportedVersion()); private MethodDispatcher _methodDispatcher; @@ -417,7 +416,7 @@ public class AMQProtocolSession implements AMQVersionAwareProtocolSession, Metho _logger.debug("Setting ProtocolVersion to :" + pv); } _protocolVersion = pv; - _methodRegistry = MethodRegistry.getMethodRegistry(pv); + _methodRegistry.setProtocolVersion(pv);; _methodDispatcher = ClientMethodDispatcherImpl.newMethodDispatcher(pv, this); } |
