Rolling back TransportImpl to a previous version.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/2877fa3b Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/2877fa3b Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/2877fa3b Branch: refs/heads/rajith-codec Commit: 2877fa3b0e06024e6dd3ce6f11d0784ca0da8337 Parents: c8f7562 Author: Rajith Attapattu <[email protected]> Authored: Wed May 13 17:52:56 2015 -0400 Committer: Rajith Attapattu <[email protected]> Committed: Wed May 13 17:52:56 2015 -0400 ---------------------------------------------------------------------- .../qpid/proton/engine/impl/TransportImpl.java | 25 +++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/2877fa3b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java ---------------------------------------------------------------------- diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java index d58cc08..9f215ee 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java @@ -45,7 +45,6 @@ import org.apache.qpid.proton.amqp.transport.Transfer; import org.apache.qpid.proton.codec.AMQPDefinedTypes; import org.apache.qpid.proton.codec.DecoderImpl; import org.apache.qpid.proton.codec.EncoderImpl; -import org.apache.qpid.proton.codec2.ByteArrayEncoder; import org.apache.qpid.proton.engine.Connection; import org.apache.qpid.proton.engine.EndpointState; import org.apache.qpid.proton.engine.Event; @@ -101,15 +100,14 @@ public class TransportImpl extends EndpointImpl private DecoderImpl _decoder = new DecoderImpl(); - //private EncoderImpl _encoder = new EncoderImpl(_decoder); - private ByteArrayEncoder _encoder = new ByteArrayEncoder(); + private EncoderImpl _encoder = new EncoderImpl(_decoder); private int _maxFrameSize = DEFAULT_MAX_FRAME_SIZE; private int _remoteMaxFrameSize = 512; private int _channelMax = 65535; private int _remoteChannelMax = 65535; - private final FrameWriter2 _frameWriter; + private final FrameWriter _frameWriter; private boolean _closeReceived; private Open _open; @@ -145,10 +143,10 @@ public class TransportImpl extends EndpointImpl */ TransportImpl(int maxFrameSize) { - AMQPDefinedTypes.registerAllTypes(_decoder, new EncoderImpl(_decoder)); + AMQPDefinedTypes.registerAllTypes(_decoder, _encoder); _maxFrameSize = maxFrameSize; - _frameWriter = new FrameWriter2(_encoder, _remoteMaxFrameSize, + _frameWriter = new FrameWriter(_encoder, _remoteMaxFrameSize, FrameWriter.AMQP_FRAME_TYPE, _protocolTracer, this); @@ -765,29 +763,28 @@ public class TransportImpl extends EndpointImpl (_connectionEndpoint != null && _connectionEndpoint.getLocalState() != EndpointState.UNINITIALIZED)) && !_isOpenSent) { - org.apache.qpid.proton.transport.Open open = new org.apache.qpid.proton.transport.Open(); + Open open = new Open(); if (_connectionEndpoint != null) { String cid = _connectionEndpoint.getLocalContainerId(); open.setContainerId(cid == null ? "" : cid); open.setHostname(_connectionEndpoint.getHostname()); - open.setDesiredCapabilities(); - open.setOfferedCapabilities(); - //open.setProperties(_connectionEndpoint.getProperties()); + open.setDesiredCapabilities(_connectionEndpoint.getDesiredCapabilities()); + open.setOfferedCapabilities(_connectionEndpoint.getOfferedCapabilities()); + open.setProperties(_connectionEndpoint.getProperties()); } else { open.setContainerId(""); } if (_maxFrameSize > 0) { - open.setMaxFrameSize(_maxFrameSize); //UnsignedInteger.valueOf(_maxFrameSize)); + open.setMaxFrameSize(UnsignedInteger.valueOf(_maxFrameSize)); } if (_channelMax > 0) { - open.setChannelMax(_channelMax); //UnsignedShort.valueOf((short) _channelMax)); + open.setChannelMax(UnsignedShort.valueOf((short) _channelMax)); } _isOpenSent = true; - //writeFrame(0, open, null, null); - _frameWriter.writeFrame(0, open, null, null); + writeFrame(0, open, null, null); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
