directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r111784 - in incubator/directory/seda/branches/trustin/src/java/org/apache/mina: core io io/socket protocol registry
Date Tue, 14 Dec 2004 05:02:50 GMT
Author: trustin
Date: Mon Dec 13 21:02:48 2004
New Revision: 111784

URL: http://svn.apache.org/viewcvs?view=rev&rev=111784
Log:
 * Renamed Session and SessionHandler to IoSession and IoSessionHandler.
 * Removed IntraVmAddress
Added:
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSession.java
      - copied, changed from r111782, incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSessionHandler.java
      - copied, changed from r111782, incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java
Removed:
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/IntraVmAddress.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java
Modified:
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java
   incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java

Deleted: /incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/IntraVmAddress.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/core/IntraVmAddress.java?view=auto&rev=111783
==============================================================================

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java	(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Acceptor.java	Mon
Dec 13 21:02:48 2004
@@ -31,7 +31,7 @@
  * @version $Rev$, $Date$
  */
 public interface Acceptor {
-    void bind(SocketAddress address, SessionHandler defaultHandler)
+    void bind(SocketAddress address, IoSessionHandler defaultHandler)
        throws IOException;
 
     void unbind(SocketAddress address);

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java	(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Connector.java	Mon
Dec 13 21:02:48 2004
@@ -31,9 +31,9 @@
  * @version $Rev$, $Date$
  */
 public interface Connector {
-    void connect(SocketAddress address, SessionHandler defaultHandler)
+    void connect(SocketAddress address, IoSessionHandler defaultHandler)
           throws IOException;
 
     void connect(SocketAddress address, int timeout,
-                 SessionHandler defaultHandler) throws IOException;
+                 IoSessionHandler defaultHandler) throws IOException;
 }

Copied: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSession.java
(from r111782, incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSession.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java&r1=111782&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSession.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java	(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSession.java	Mon
Dec 13 21:02:48 2004
@@ -32,7 +32,7 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public interface Session {
+public interface IoSession {
     void close();
 
     Object getAttachment();

Copied: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSessionHandler.java
(from r111782, incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java)
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSessionHandler.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java&r1=111782&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSessionHandler.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/IoSessionHandler.java
Mon Dec 13 21:02:48 2004
@@ -29,18 +29,18 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public interface SessionHandler {
-    void sessionOpened(Session session);
+public interface IoSessionHandler {
+    void sessionOpened(IoSession IoSession);
 
-    void sessionClosed(Session session);
+    void sessionClosed(IoSession IoSession);
 
-    void sessionIdle(Session session, IdleStatus status);
+    void sessionIdle(IoSession IoSession, IdleStatus status);
 
-    void exceptionCaught(Session session, Throwable cause);
+    void exceptionCaught(IoSession IoSession, Throwable cause);
 
-    void dataRead(Session session, int readBytes);
+    void dataRead(IoSession IoSession, int readBytes);
 
-    void dataWritten(Session session, int writtenBytes);
+    void dataWritten(IoSession IoSession, int writtenBytes);
     
-    void markerReleased(Session session, Object marker);
+    void markerReleased(IoSession IoSession, Object marker);
 }

Deleted: /incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/Session.java?view=auto&rev=111783
==============================================================================

Deleted: /incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/SessionHandler.java?view=auto&rev=111783
==============================================================================

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpAcceptor.java
Mon Dec 13 21:02:48 2004
@@ -34,7 +34,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.mina.io.Acceptor;
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSessionHandler;
 
 
 /**
@@ -59,13 +59,13 @@
         selector = Selector.open();
     }
 
-    public void bind(SocketAddress address, SessionHandler defaultHandler)
+    public void bind(SocketAddress address, IoSessionHandler defaultHandler)
               throws IOException {
         this.bind(address, 50, defaultHandler);
     }
 
     public synchronized void bind(SocketAddress address, int backlog,
-                                  SessionHandler defaultHandler)
+                                  IoSessionHandler defaultHandler)
                            throws IOException {
         Validate.notNull(address);
         Validate.notNull(defaultHandler);
@@ -137,7 +137,7 @@
 
                         TcpSession session =
                             new TcpSession(ch,
-                                           (SessionHandler) key.attachment());
+                                           (IoSessionHandler) key.attachment());
                         TcpIoProcessor.getInstance().addSession(session);
                     }
                 } catch (IOException e) {

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpConnector.java
Mon Dec 13 21:02:48 2004
@@ -33,7 +33,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.mina.io.Connector;
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSessionHandler;
 
 
 /**
@@ -58,13 +58,13 @@
         selector = Selector.open();
     }
 
-    public void connect(SocketAddress address, SessionHandler defaultHandler)
+    public void connect(SocketAddress address, IoSessionHandler defaultHandler)
                  throws IOException {
         connect(address, Integer.MAX_VALUE, defaultHandler);
     }
 
     public void connect(SocketAddress address, int timeout,
-                        SessionHandler defaultHandler)
+                        IoSessionHandler defaultHandler)
                  throws IOException {
         Validate.notNull(address);
         Validate.notNull(defaultHandler);
@@ -169,7 +169,7 @@
         }
     }
 
-    private void newSession(SocketChannel ch, SessionHandler handler) {
+    private void newSession(SocketChannel ch, IoSessionHandler handler) {
         TcpSession session = new TcpSession(ch, handler);
         TcpIoProcessor.getInstance().addSession(session);
     }
@@ -197,11 +197,11 @@
 
     private static class ConnectEntry {
         private final long deadline;
-        private final SessionHandler handler;
+        private final IoSessionHandler handler;
         private boolean done;
         private IOException exception;
 
-        private ConnectEntry(int timeout, SessionHandler handler) {
+        private ConnectEntry(int timeout, IoSessionHandler handler) {
             this.deadline = System.currentTimeMillis() + timeout * 1000L;
             this.handler = handler;
         }

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/io/socket/TcpSession.java
Mon Dec 13 21:02:48 2004
@@ -27,8 +27,8 @@
 import org.apache.mina.core.IdleStatus;
 import org.apache.mina.core.SessionConfig;
 import org.apache.mina.io.ReadBuffer;
-import org.apache.mina.io.Session;
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSession;
+import org.apache.mina.io.IoSessionHandler;
 import org.apache.mina.io.WriteBuffer;
 import org.apache.mina.util.ByteBufferPool;
 
@@ -39,12 +39,12 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-class TcpSession implements Session {
+class TcpSession implements IoSession {
     private final SocketChannel ch;
     private final TcpSessionConfig config;
     private final TcpReadBuffer readBuf;
     private final TcpWriteBuffer writeBuf;
-    private final SessionHandler handler;
+    private final IoSessionHandler handler;
     private SelectionKey key;
     private Object attachment;
     private long readBytes;
@@ -58,7 +58,7 @@
     /**
      * Creates a new instance.
      */
-    TcpSession(SocketChannel ch, SessionHandler defaultHandler) {
+    TcpSession(SocketChannel ch, IoSessionHandler defaultHandler) {
         this.ch = ch;
         this.config = new TcpSessionConfig(ch);
         this.readBuf =
@@ -71,7 +71,7 @@
         return ch;
     }
     
-    SessionHandler getHandler() {
+    IoSessionHandler getHandler() {
     	return handler;
     }
 

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/protocol/CoreAdapter.java
Mon Dec 13 21:02:48 2004
@@ -26,8 +26,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.mina.core.*;
 import org.apache.mina.io.ReadBuffer;
-import org.apache.mina.io.Session;
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSession;
+import org.apache.mina.io.IoSessionHandler;
 import org.apache.mina.io.WriteBuffer;
 import org.apache.mina.util.Queue;
 
@@ -44,13 +44,13 @@
     private static final Log log = LogFactory.getLog( CoreAdapter.class );
 
 
-    public static SessionHandler adapt( ProtocolProvider protocolProvider )
+    public static IoSessionHandler adapt( ProtocolProvider protocolProvider )
     {
         return new SessionHandlerAdapter( protocolProvider );
     }
 
 
-    private static class SessionHandlerAdapter implements SessionHandler
+    private static class SessionHandlerAdapter implements IoSessionHandler
     {
         private final ProtocolCodec codec;
         private final ProtocolSessionHandler handler;
@@ -63,7 +63,7 @@
         }
 
 
-        public void sessionOpened( Session session )
+        public void sessionOpened( IoSession session )
         {
             ProtocolSession psession = new ProtocolSessionImpl( session, this );
             session.setAttachment( psession );
@@ -71,26 +71,26 @@
         }
 
 
-        public void sessionClosed( Session session )
+        public void sessionClosed( IoSession session )
         {
             fireSessionClosed( ( ProtocolSession ) session.getAttachment() );
         }
 
 
-        public void sessionIdle( Session session, IdleStatus status )
+        public void sessionIdle( IoSession session, IdleStatus status )
         {
             fireSessionIdle( ( ProtocolSession ) session.getAttachment(), status );
         }
 
 
-        public void exceptionCaught( Session session, Throwable cause )
+        public void exceptionCaught( IoSession session, Throwable cause )
         {
             fireExceptionCaught( ( ProtocolSession ) session.getAttachment(),
                     cause );
         }
 
 
-        public void dataRead( Session session, int readBytes )
+        public void dataRead( IoSession session, int readBytes )
         {
             ProtocolSession psession =
                     ( ProtocolSession ) session.getAttachment();
@@ -135,19 +135,19 @@
         }
 
 
-        public void dataWritten( Session session, int writtenBytes )
+        public void dataWritten( IoSession session, int writtenBytes )
         {
             write( session );
         }
 
 
-        public void markerReleased( Session session, Object marker )
+        public void markerReleased( IoSession session, Object marker )
         {
             fireMessageSent( ( ProtocolSession ) session.getAttachment(), marker );
         }
 
 
-        private void write( Session session )
+        private void write( IoSession session )
         {
             ProtocolSessionImpl psession =
                     ( ProtocolSessionImpl ) session.getAttachment();
@@ -269,13 +269,13 @@
 
     private static class ProtocolSessionImpl implements ProtocolSession
     {
-        private final Session session;
+        private final IoSession session;
         private final SessionHandlerAdapter adapter;
         private final Queue writeQueue = new Queue( 16 );
         private Object attachment;
 
 
-        private ProtocolSessionImpl( Session session,
+        private ProtocolSessionImpl( IoSession session,
                                      SessionHandlerAdapter adapter )
         {
             this.session = session;

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/Service.java
Mon Dec 13 21:02:48 2004
@@ -19,7 +19,7 @@
  */
 package org.apache.mina.registry;
 
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSessionHandler;
 
 
 /**
@@ -35,5 +35,5 @@
 
     int getPort();
 
-    SessionHandler getSessionHandler();
+    IoSessionHandler getSessionHandler();
 }

Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java?view=diff&rev=111784&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java&r1=111783&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java&r2=111784
==============================================================================
--- incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java
(original)
+++ incubator/directory/seda/branches/trustin/src/java/org/apache/mina/registry/ServiceRegistry.java
Mon Dec 13 21:02:48 2004
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.util.Iterator;
 
-import org.apache.mina.io.SessionHandler;
+import org.apache.mina.io.IoSessionHandler;
 
 
 /**
@@ -35,7 +35,7 @@
  */
 public interface ServiceRegistry {
     void bind(Service service,
-              SessionHandler sessionHandler)
+              IoSessionHandler sessionHandler)
        throws IOException;
 
     void unbind(Service service);

Mime
View raw message