You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2015/08/14 21:08:10 UTC

[37/50] [abbrv] qpid-proton git commit: Rolling back TransportImpl to a previous version.

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/9393c45a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9393c45a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9393c45a

Branch: refs/heads/rajith-codec
Commit: 9393c45aa2f051a72ef8468209cbadc5471b0c56
Parents: 5badc38
Author: Rajith Attapattu <ra...@apache.org>
Authored: Wed May 13 17:52:56 2015 -0400
Committer: Rajith Attapattu <ra...@apache.org>
Committed: Thu Jul 9 09:15:57 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/9393c45a/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 7270666..595afd6 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
@@ -44,7 +44,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;
@@ -97,15 +96,14 @@ public class TransportImpl extends EndpointImpl
     private TransportOutput _outputProcessor;
 
     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       = CHANNEL_MAX_LIMIT;
     private int _remoteChannelMax = CHANNEL_MAX_LIMIT;
 
-    private final FrameWriter2 _frameWriter;
+    private final FrameWriter _frameWriter;
 
     private boolean _closeReceived;
     private Open _open;
@@ -154,10 +152,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);
@@ -793,23 +791,23 @@ 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));
             }
 
             // as per the recommendation in the spec, advertise half our
@@ -819,8 +817,7 @@ public class TransportImpl extends EndpointImpl
             }
             _isOpenSent = true;
 
-            //writeFrame(0, open, null, null);
-            _frameWriter.writeFrame(0, open, null, null);
+            writeFrame(0, open, null, null);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org