directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r123260 - in incubator/directory/network/trunk/mina/src: examples/org/apache/mina/examples/echoserver examples/org/apache/mina/examples/netcat examples/org/apache/mina/examples/reverser java/org/apache/mina/io/socket test/org/apache/mina/examples/echoserver
Date Fri, 24 Dec 2004 00:40:18 GMT
Author: trustin
Date: Thu Dec 23 16:40:16 2004
New Revision: 123260

URL: http://svn.apache.org/viewcvs?view=rev&rev=123260
Log:
 * Renamed Tcp* to Socket*
Added:
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketAcceptor.java
      - copied, changed from r123259, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketConnector.java
      - copied, changed from r123259, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
      - copied, changed from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketReadBuffer.java
      - copied, changed from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
      - copied, changed from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSessionConfig.java
      - copied, changed from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketWriteBuffer.java
      - copied, changed from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java
Removed:
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java
Modified:
   incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java
   incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java
   incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java
   incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java

Modified: incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java
(original)
+++ incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/echoserver/Main.java
Thu Dec 23 16:40:16 2004
@@ -22,7 +22,7 @@
 
 import org.apache.mina.io.Acceptor;
 import org.apache.mina.io.filter.IoThreadPoolFilter;
-import org.apache.mina.io.socket.TcpAcceptor;
+import org.apache.mina.io.socket.SocketAcceptor;
 
 /**
  * TODO Document me.
@@ -36,7 +36,7 @@
 
     public static void main( String[] args ) throws Exception
     {
-        Acceptor acceptor = new TcpAcceptor();
+        Acceptor acceptor = new SocketAcceptor();
         acceptor.addFilter( Integer.MAX_VALUE, new IoThreadPoolFilter() );
         acceptor.bind( new InetSocketAddress( PORT ),
                        new EchoProtocolHandler() );

Modified: incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java
(original)
+++ incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/netcat/Main.java
Thu Dec 23 16:40:16 2004
@@ -21,7 +21,7 @@
 import java.net.InetSocketAddress;
 
 import org.apache.mina.io.filter.IoThreadPoolFilter;
-import org.apache.mina.io.socket.TcpConnector;
+import org.apache.mina.io.socket.SocketConnector;
 
 /**
  * TODO Document me.
@@ -39,7 +39,7 @@
             return;
         }
 
-        TcpConnector connector = new TcpConnector();
+        SocketConnector connector = new SocketConnector();
         connector.addFilter( Integer.MAX_VALUE, new IoThreadPoolFilter() );
         connector.connect( new InetSocketAddress( args[ 0 ], Integer
                 .parseInt( args[ 1 ] ) ), 60, new NetCatProtocolHandler() );

Modified: incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java
(original)
+++ incubator/directory/network/trunk/mina/src/examples/org/apache/mina/examples/reverser/Main.java
Thu Dec 23 16:40:16 2004
@@ -22,7 +22,7 @@
 
 import org.apache.mina.io.Acceptor;
 import org.apache.mina.io.filter.IoThreadPoolFilter;
-import org.apache.mina.io.socket.TcpAcceptor;
+import org.apache.mina.io.socket.SocketAcceptor;
 import org.apache.mina.protocol.IoAdapter;
 import org.apache.mina.protocol.filter.ProtocolThreadPoolFilter;
 
@@ -38,7 +38,7 @@
 
     public static void main( String[] args ) throws Exception
     {
-        Acceptor acceptor = new TcpAcceptor();
+        Acceptor acceptor = new SocketAcceptor();
         IoAdapter ioAdapter = new IoAdapter();
 
         acceptor.addFilter( Integer.MAX_VALUE, new IoThreadPoolFilter() );

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketAcceptor.java
(from r123259, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketAcceptor.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketAcceptor.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketAcceptor.java
Thu Dec 23 16:40:16 2004
@@ -44,7 +44,7 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public class TcpAcceptor implements Acceptor
+public class SocketAcceptor implements Acceptor
 {
     private static volatile int nextId = 0;
 
@@ -69,7 +69,7 @@
      * 
      * @throws IOException
      */
-    public TcpAcceptor() throws IOException
+    public SocketAcceptor() throws IOException
     {
         selector = Selector.open();
     }
@@ -155,7 +155,7 @@
     {
         public Worker()
         {
-            super( "TcpAcceptor-" + id );
+            super( "SocketAcceptor-" + id );
         }
 
         public void run()
@@ -170,7 +170,7 @@
 
                     if( selector.keys().isEmpty() )
                     {
-                        synchronized( TcpAcceptor.this )
+                        synchronized( SocketAcceptor.this )
                         {
                             if( selector.keys().isEmpty() )
                             {
@@ -203,17 +203,17 @@
                         if( ch == null )
                             continue;
 
-                        TcpSession session = new TcpSession(
+                        SocketSession session = new SocketSession(
                                                              filterManager,
                                                              ch,
                                                              ( IoHandler ) key
                                                                      .attachment() );
-                        TcpIoProcessor.getInstance().addSession( session );
+                        SocketIoProcessor.getInstance().addSession( session );
                     }
                 }
                 catch( IOException e )
                 {
-                    exceptionMonitor.exceptionCaught( TcpAcceptor.this, e );
+                    exceptionMonitor.exceptionCaught( SocketAcceptor.this, e );
 
                     try
                     {

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketConnector.java
(from r123259, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketConnector.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketConnector.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketConnector.java
Thu Dec 23 16:40:16 2004
@@ -42,7 +42,7 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public class TcpConnector implements Connector
+public class SocketConnector implements Connector
 {
     private static volatile int nextId = 0;
 
@@ -61,7 +61,7 @@
      * 
      * @throws IOException
      */
-    public TcpConnector() throws IOException
+    public SocketConnector() throws IOException
     {
         selector = Selector.open();
     }
@@ -148,7 +148,7 @@
             try
             {
                 ch.finishConnect();
-                TcpSession session = newSession( ch, entry.handler );
+                SocketSession session = newSession( ch, entry.handler );
                 entry.session = session;
                 entry.done = true;
 
@@ -205,10 +205,10 @@
         }
     }
 
-    private TcpSession newSession( SocketChannel ch, IoHandler handler )
+    private SocketSession newSession( SocketChannel ch, IoHandler handler )
     {
-        TcpSession session = new TcpSession( filterManager, ch, handler );
-        TcpIoProcessor.getInstance().addSession( session );
+        SocketSession session = new SocketSession( filterManager, ch, handler );
+        SocketIoProcessor.getInstance().addSession( session );
         return session;
     }
 
@@ -216,7 +216,7 @@
     {
         public Worker()
         {
-            super( "TcpConnector-" + id );
+            super( "SocketConnector-" + id );
         }
 
         public void run()
@@ -229,7 +229,7 @@
 
                     if( selector.keys().isEmpty() )
                     {
-                        synchronized( TcpConnector.this )
+                        synchronized( SocketConnector.this )
                         {
                             if( selector.keys().isEmpty() )
                             {
@@ -247,7 +247,7 @@
                 }
                 catch( IOException e )
                 {
-                    exceptionMonitor.exceptionCaught( TcpConnector.this, e );
+                    exceptionMonitor.exceptionCaught( SocketConnector.this, e );
 
                     try
                     {
@@ -267,7 +267,7 @@
 
         private final IoHandler handler;
 
-        private TcpSession session;
+        private SocketSession session;
 
         private boolean done;
 

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
(from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketIoProcessor.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java&r1=123187&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketIoProcessor.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
Thu Dec 23 16:40:16 2004
@@ -37,17 +37,17 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$,
  */
-class TcpIoProcessor
+class SocketIoProcessor
 {
-    private static final TcpIoProcessor instance;
+    private static final SocketIoProcessor instance;
 
     static
     {
-        TcpIoProcessor tmp;
+        SocketIoProcessor tmp;
 
         try
         {
-            tmp = new TcpIoProcessor();
+            tmp = new SocketIoProcessor();
         }
         catch( IOException e )
         {
@@ -74,17 +74,17 @@
 
     private long lastIdleCheckTime = System.currentTimeMillis();
 
-    private TcpIoProcessor() throws IOException
+    private SocketIoProcessor() throws IOException
     {
         selector = Selector.open();
     }
 
-    public static TcpIoProcessor getInstance()
+    public static SocketIoProcessor getInstance()
     {
         return instance;
     }
 
-    public void addSession( TcpSession session )
+    public void addSession( SocketSession session )
     {
         synchronized( this )
         {
@@ -103,19 +103,19 @@
         selector.wakeup();
     }
 
-    public void removeSession( TcpSession session )
+    public void removeSession( SocketSession session )
     {
         scheduleRemove( session );
         selector.wakeup();
     }
 
-    public void flushSession( TcpSession session )
+    public void flushSession( SocketSession session )
     {
         scheduleFlush( session );
         selector.wakeup();
     }
 
-    public void addReadableSession( TcpSession session )
+    public void addReadableSession( SocketSession session )
     {
         synchronized( readableSessions )
         {
@@ -129,13 +129,13 @@
         if( newSessions.isEmpty() )
             return;
 
-        TcpSession session;
+        SocketSession session;
 
         for( ;; )
         {
             synchronized( newSessions )
             {
-                session = ( TcpSession ) newSessions.pop();
+                session = ( SocketSession ) newSessions.pop();
             }
 
             if( session == null )
@@ -172,13 +172,13 @@
         if( readableSessions.isEmpty() )
             return;
 
-        TcpSession session;
+        SocketSession session;
 
         for( ;; )
         {
             synchronized( readableSessions )
             {
-                session = ( TcpSession ) readableSessions.pop();
+                session = ( SocketSession ) readableSessions.pop();
             }
 
             if( session == null )
@@ -199,11 +199,11 @@
 
         for( ;; )
         {
-            TcpSession session;
+            SocketSession session;
 
             synchronized( removingSessions )
             {
-                session = ( TcpSession ) removingSessions.pop();
+                session = ( SocketSession ) removingSessions.pop();
             }
 
             if( session == null )
@@ -235,7 +235,7 @@
         while( it.hasNext() )
         {
             SelectionKey key = ( SelectionKey ) it.next();
-            TcpSession session = ( TcpSession ) key.attachment();
+            SocketSession session = ( SocketSession ) key.attachment();
 
             if( key.isReadable() )
             {
@@ -251,9 +251,9 @@
         selectedKeys.clear();
     }
 
-    private void read( TcpSession session )
+    private void read( SocketSession session )
     {
-        TcpReadBuffer lock = ( TcpReadBuffer ) session.getReadBuffer();
+        SocketReadBuffer lock = ( SocketReadBuffer ) session.getReadBuffer();
         ByteBuffer readBuf = lock.buf();
         SocketChannel ch = session.getChannel();
 
@@ -307,7 +307,7 @@
         }
     }
 
-    private void scheduleRemove( TcpSession session )
+    private void scheduleRemove( SocketSession session )
     {
         synchronized( removingSessions )
         {
@@ -315,7 +315,7 @@
         }
     }
 
-    private void scheduleFlush( TcpSession session )
+    private void scheduleFlush( SocketSession session )
     {
         synchronized( flushingSessions )
         {
@@ -327,7 +327,7 @@
     {
         Set keys = selector.keys();
         Iterator it;
-        TcpSession session;
+        SocketSession session;
 
         // process idle sessions
         long currentTime = System.currentTimeMillis();
@@ -340,14 +340,14 @@
             while( it.hasNext() )
             {
                 SelectionKey key = ( SelectionKey ) it.next();
-                session = ( TcpSession ) key.attachment();
+                session = ( SocketSession ) key.attachment();
 
                 notifyIdleSession( session, currentTime );
             }
         }
     }
 
-    private void notifyIdleSession( TcpSession session, long currentTime )
+    private void notifyIdleSession( SocketSession session, long currentTime )
     {
         SessionConfig config = session.getConfig();
         notifyIdleSession0( session, currentTime, config
@@ -361,7 +361,7 @@
                             IdleStatus.WRITER_IDLE, session.getLastWriteTime() );
     }
 
-    private void notifyIdleSession0( TcpSession session, long currentTime,
+    private void notifyIdleSession0( SocketSession session, long currentTime,
                                     long idleTime, IdleStatus status,
                                     long lastIoTime )
     {
@@ -380,11 +380,11 @@
 
         for( ;; )
         {
-            TcpSession session;
+            SocketSession session;
 
             synchronized( flushingSessions )
             {
-                session = ( TcpSession ) flushingSessions.pop();
+                session = ( SocketSession ) flushingSessions.pop();
             }
 
             if( session == null )
@@ -397,9 +397,10 @@
         }
     }
 
-    private void flush( TcpSession session )
+    private void flush( SocketSession session )
     {
-        TcpWriteBuffer lock = ( TcpWriteBuffer ) session.getWriteBuffer();
+        SocketWriteBuffer lock = ( SocketWriteBuffer ) session
+                .getWriteBuffer();
         ByteBuffer writeBuf = lock.buf();
         SocketChannel ch = session.getChannel();
 
@@ -417,7 +418,7 @@
                     Queue markers = lock.getMarkers();
                     for( ;; )
                     {
-                        TcpWriteBuffer.Marker marker = ( TcpWriteBuffer.Marker ) markers
+                        SocketWriteBuffer.Marker marker = ( SocketWriteBuffer.Marker ) markers
                                 .pop();
                         if( marker == null )
                             break;
@@ -463,7 +464,7 @@
                         Queue markers = lock.getMarkers();
                         for( ;; )
                         {
-                            TcpWriteBuffer.Marker marker = ( TcpWriteBuffer.Marker ) markers
+                            SocketWriteBuffer.Marker marker = ( SocketWriteBuffer.Marker
) markers
                                     .first();
                             if( marker == null )
                                 break;
@@ -507,7 +508,7 @@
     {
         public Worker()
         {
-            super( "TcpIoProcessor" );
+            super( "SocketIoProcessor" );
         }
 
         public void run()
@@ -521,7 +522,7 @@
 
                     if( selector.keys().isEmpty() )
                     {
-                        synchronized( TcpIoProcessor.this )
+                        synchronized( SocketIoProcessor.this )
                         {
                             if( selector.keys().isEmpty() )
                             {

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketReadBuffer.java
(from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketReadBuffer.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java&r1=123187&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketReadBuffer.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketReadBuffer.java
Thu Dec 23 16:40:16 2004
@@ -29,11 +29,11 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$,
  */
-class TcpReadBuffer extends AbstractReadBuffer implements ReadBuffer
+class SocketReadBuffer extends AbstractReadBuffer implements ReadBuffer
 {
-    private final TcpSession parent;
+    private final SocketSession parent;
 
-    TcpReadBuffer( TcpSession parent, ByteBuffer buf )
+    SocketReadBuffer( SocketSession parent, ByteBuffer buf )
     {
         super( buf );
         this.parent = parent;
@@ -41,7 +41,7 @@
 
     public ReadBuffer signal()
     {
-        TcpIoProcessor.getInstance().addReadableSession( parent );
+        SocketIoProcessor.getInstance().addReadableSession( parent );
         return this;
     }
 

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
(from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java&r1=123187&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSession.java
Thu Dec 23 16:40:16 2004
@@ -38,17 +38,17 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-class TcpSession implements IoSession
+class SocketSession implements IoSession
 {
     private final IoHandlerFilterManager filterManager;
 
     private final SocketChannel ch;
 
-    private final TcpSessionConfig config;
+    private final SocketSessionConfig config;
 
-    private final TcpReadBuffer readBuf;
+    private final SocketReadBuffer readBuf;
 
-    private final TcpWriteBuffer writeBuf;
+    private final SocketWriteBuffer writeBuf;
 
     private final IoHandler handler;
 
@@ -77,15 +77,15 @@
     /**
      * Creates a new instance.
      */
-    TcpSession( IoHandlerFilterManager filterManager, SocketChannel ch,
+    SocketSession( IoHandlerFilterManager filterManager, SocketChannel ch,
                IoHandler defaultHandler )
     {
         this.filterManager = filterManager;
         this.ch = ch;
-        this.config = new TcpSessionConfig( ch );
-        this.readBuf = new TcpReadBuffer( this, ( ByteBuffer ) ByteBufferPool
+        this.config = new SocketSessionConfig( ch );
+        this.readBuf = new SocketReadBuffer( this, ( ByteBuffer ) ByteBufferPool
                 .open().limit( 0 ) );
-        this.writeBuf = new TcpWriteBuffer( this, ByteBufferPool.open() );
+        this.writeBuf = new SocketWriteBuffer( this, ByteBufferPool.open() );
         this.handler = defaultHandler;
         this.remoteAddress = ch.socket().getRemoteSocketAddress();
         this.localAddress = ch.socket().getLocalSocketAddress();
@@ -124,7 +124,7 @@
 
     public void close()
     {
-        TcpIoProcessor.getInstance().removeSession( this );
+        SocketIoProcessor.getInstance().removeSession( this );
     }
 
     public Object getAttachment()
@@ -149,7 +149,7 @@
 
     void flush()
     {
-        TcpIoProcessor.getInstance().flushSession( this );
+        SocketIoProcessor.getInstance().flushSession( this );
     }
 
     public boolean isConnected()

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSessionConfig.java
(from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSessionConfig.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java&r1=123187&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSessionConfig.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketSessionConfig.java
Thu Dec 23 16:40:16 2004
@@ -29,11 +29,11 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$,
  */
-public class TcpSessionConfig extends BasicSessionConfig
+public class SocketSessionConfig extends BasicSessionConfig
 {
     private final SocketChannel ch;
 
-    TcpSessionConfig( SocketChannel ch )
+    SocketSessionConfig( SocketChannel ch )
     {
         this.ch = ch;
     }

Copied: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketWriteBuffer.java
(from r123187, incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketWriteBuffer.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java&r1=123187&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketWriteBuffer.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/SocketWriteBuffer.java
Thu Dec 23 16:40:16 2004
@@ -30,11 +30,11 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$,
  */
-class TcpWriteBuffer extends AbstractWriteBuffer implements WriteBuffer
+class SocketWriteBuffer extends AbstractWriteBuffer implements WriteBuffer
 {
-    private final TcpSession session;
+    private final SocketSession session;
 
-    TcpWriteBuffer( TcpSession session, ByteBuffer buf )
+    SocketWriteBuffer( SocketSession session, ByteBuffer buf )
     {
         super( buf );
         this.session = session;

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpIoProcessor.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpReadBuffer.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSession.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpSessionConfig.java?view=auto&rev=123259
==============================================================================

Deleted: /incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpWriteBuffer.java?view=auto&rev=123259
==============================================================================

Modified: incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java?view=diff&rev=123260&p1=incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java&r1=123259&p2=incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java&r2=123260
==============================================================================
--- incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
(original)
+++ incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
Thu Dec 23 16:40:16 2004
@@ -12,7 +12,7 @@
 
 import org.apache.mina.io.Acceptor;
 import org.apache.mina.io.filter.IoThreadPoolFilter;
-import org.apache.mina.io.socket.TcpAcceptor;
+import org.apache.mina.io.socket.SocketAcceptor;
 
 /**
  * TODO Document me.
@@ -28,7 +28,7 @@
 
     protected void setUp() throws Exception
     {
-        acceptor = new TcpAcceptor();
+        acceptor = new SocketAcceptor();
         acceptor.bind( new InetSocketAddress( PORT ),
                        new EchoProtocolHandler() );
         acceptor.addFilter( Integer.MAX_VALUE, new IoThreadPoolFilter() );

Mime
View raw message