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 2012/08/13 19:11:00 UTC

svn commit: r1372518 - in /qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl: ConnectorImpl.java DriverImpl.java ServerConnectorImpl.java

Author: rajith
Date: Mon Aug 13 17:10:59 2012
New Revision: 1372518

URL: http://svn.apache.org/viewvc?rev=1372518&view=rev
Log:
NO_JIRA Renamed ServerConnectorImpl to ConnectorImpl as the same impl
could be used for writing both client and server versions.

Added:
    qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ConnectorImpl.java
      - copied, changed from r1372508, qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ServerConnectorImpl.java
Removed:
    qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ServerConnectorImpl.java
Modified:
    qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/DriverImpl.java

Copied: qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ConnectorImpl.java (from r1372508, qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ServerConnectorImpl.java)
URL: http://svn.apache.org/viewvc/qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ConnectorImpl.java?p2=qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ConnectorImpl.java&p1=qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ServerConnectorImpl.java&r1=1372508&r2=1372518&rev=1372518&view=diff
==============================================================================
--- qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ServerConnectorImpl.java (original)
+++ qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/ConnectorImpl.java Mon Aug 13 17:10:59 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.qpid.proton.driver.impl;
 
-import static org.apache.qpid.proton.driver.impl.ServerConnectorImpl.ConnectorState.UNINITIALIZED;
+import static org.apache.qpid.proton.driver.impl.ConnectorImpl.ConnectorState.UNINITIALIZED;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -30,7 +30,7 @@ import org.apache.qpid.proton.engine.Sas
 import org.apache.qpid.proton.engine.Sasl.SaslState;
 import org.apache.qpid.proton.logging.LogHandler;
 
-class ServerConnectorImpl<C> implements Connector<C>
+class ConnectorImpl<C> implements Connector<C>
 {
     public static int END_OF_STREAM = -1;
     private static int DEFAULT_BUFFER_SIZE = 64 * 1024;
@@ -58,7 +58,7 @@ class ServerConnectorImpl<C> implements 
     private int _bytesNotWritten = 0;
     private ByteBuffer _writeBuffer = ByteBuffer.allocate(writeBufferSize);
 
-    ServerConnectorImpl(DriverImpl driver, Listener<C> listener, Sasl sasl, SocketChannel c, C context, SelectionKey key)
+    ConnectorImpl(DriverImpl driver, Listener<C> listener, Sasl sasl, SocketChannel c, C context, SelectionKey key)
     {
         _driver = driver;
         _listener = listener;
@@ -264,14 +264,7 @@ class ServerConnectorImpl<C> implements 
 
     public void setConnection(Connection connection)
     {
-        // write any remaining data on to the wire.
-        //writeSasl();
         _connection = connection;
-        // write initial data
-        //int size = _writeBuffer.array().length - _bytesNotWritten;
-        //_bytesNotWritten += _connection.transport().output(_writeBuffer.array(),
-        //        _bytesNotWritten, size);
-        //setState(ConnectorState.OPENED);
     }
 
     public C getContext()

Modified: qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/DriverImpl.java
URL: http://svn.apache.org/viewvc/qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/DriverImpl.java?rev=1372518&r1=1372517&r2=1372518&view=diff
==============================================================================
--- qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/DriverImpl.java (original)
+++ qpid/proton/branches/rajith_sandbox/proton-j/src/org/apache/qpid/proton/driver/impl/DriverImpl.java Mon Aug 13 17:10:59 2012
@@ -218,7 +218,7 @@ public class DriverImpl implements Drive
     public <C> Connector<C> createConnector(SelectableChannel c, C context)
     {
         SelectionKey key = registerInterest(c,SelectionKey.OP_READ | SelectionKey.OP_WRITE);
-        Connector<C> co = new ServerConnectorImpl<C>(this, null, new SaslClientImpl(),(SocketChannel)c, context, key);
+        Connector<C> co = new ConnectorImpl<C>(this, null, new SaslClientImpl(),(SocketChannel)c, context, key);
         key.attach(co);
         return co;
     }
@@ -226,7 +226,7 @@ public class DriverImpl implements Drive
     protected <C> Connector<C> createServerConnector(SelectableChannel c, C context, Listener<C> l)
     {
         SelectionKey key = registerInterest(c,SelectionKey.OP_READ | SelectionKey.OP_WRITE);
-        Connector<C> co = new ServerConnectorImpl<C>(this, l, new SaslServerImpl(),(SocketChannel)c, context, key);
+        Connector<C> co = new ConnectorImpl<C>(this, l, new SaslServerImpl(),(SocketChannel)c, context, key);
         key.attach(co);
         return co;
     }



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