directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r326548 - in /directory/network/trunk/src: examples/org/apache/mina/examples/netcat/ examples/org/apache/mina/examples/sumup/ java/org/apache/mina/common/ java/org/apache/mina/common/support/ java/org/apache/mina/transport/socket/nio/ java/...
Date Wed, 19 Oct 2005 13:08:34 GMT
Author: trustin
Date: Wed Oct 19 06:08:05 2005
New Revision: 326548

URL: http://svn.apache.org/viewcvs?rev=326548&view=rev
Log:
* Merged IoSessionManagerConfig and its decendants into appropriate acceptors and connectors
** This simplifies configuration process dramatically
* Added BaseIoConnector which implements getters and setters for common configuration properties

Added:
    directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java 
 (with props)
Removed:
    directory/network/trunk/src/java/org/apache/mina/common/IoAcceptorConfig.java
    directory/network/trunk/src/java/org/apache/mina/common/IoConnectorConfig.java
    directory/network/trunk/src/java/org/apache/mina/common/IoSessionManagerConfig.java
    directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptorConfig.java
    directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnectorConfig.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptorConfig.java
Modified:
    directory/network/trunk/src/examples/org/apache/mina/examples/netcat/Main.java
    directory/network/trunk/src/examples/org/apache/mina/examples/sumup/Client.java
    directory/network/trunk/src/java/org/apache/mina/common/IoConnector.java
    directory/network/trunk/src/java/org/apache/mina/common/IoSessionManager.java
    directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketConnector.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorImpl.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorImpl.java
    directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java

Modified: directory/network/trunk/src/examples/org/apache/mina/examples/netcat/Main.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/examples/org/apache/mina/examples/netcat/Main.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/examples/org/apache/mina/examples/netcat/Main.java (original)
+++ directory/network/trunk/src/examples/org/apache/mina/examples/netcat/Main.java Wed Oct
19 06:08:05 2005
@@ -20,7 +20,6 @@
 
 import java.net.InetSocketAddress;
 
-import org.apache.mina.common.IoConnectorConfig;
 import org.apache.mina.transport.socket.nio.SocketConnector;
 
 /**
@@ -45,7 +44,7 @@
         SocketConnector connector = new SocketConnector();
 
         // Set connect timeout.
-        ( ( IoConnectorConfig ) connector.getConfig() ).setConnectTimeout( 30 );
+        connector.setConnectTimeout( 30 );
         
         // Start communication.
         connector.connect( 

Modified: directory/network/trunk/src/examples/org/apache/mina/examples/sumup/Client.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/examples/org/apache/mina/examples/sumup/Client.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/examples/org/apache/mina/examples/sumup/Client.java (original)
+++ directory/network/trunk/src/examples/org/apache/mina/examples/sumup/Client.java Wed Oct
19 06:08:05 2005
@@ -23,7 +23,6 @@
 
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
-import org.apache.mina.common.IoConnectorConfig;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.filter.ThreadPoolFilter;
 import org.apache.mina.transport.socket.nio.SocketConnector;
@@ -67,7 +66,7 @@
                 "protocolThreadPool", protocolThreadPoolFilter );
 
         // Set connect timeout.
-        ( ( IoConnectorConfig ) connector.getConfig() ).setConnectTimeout( CONNECT_TIMEOUT
);
+        connector.setConnectTimeout( CONNECT_TIMEOUT );
         
         IoSession session;
         for( ;; )

Modified: directory/network/trunk/src/java/org/apache/mina/common/IoConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/IoConnector.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/IoConnector.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/IoConnector.java Wed Oct 19 06:08:05
2005
@@ -62,4 +62,19 @@
      */
     ConnectFuture connect( SocketAddress address, SocketAddress localAddress,
                            IoHandler handler ) throws IOException;
+
+    /**
+     * Returns the connect timeout in seconds.
+     */
+    int getConnectTimeout();
+
+    /**
+     * Returns the connect timeout in milliseconds.
+     */
+    long getConnectTimeoutMillis();
+
+    /**
+     * Sets the connect timeout in seconds.
+     */
+    void setConnectTimeout( int connectTimeout );
 }

Modified: directory/network/trunk/src/java/org/apache/mina/common/IoSessionManager.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/IoSessionManager.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/IoSessionManager.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/IoSessionManager.java Wed Oct
19 06:08:05 2005
@@ -34,11 +34,6 @@
 public interface IoSessionManager {
     
     /**
-     * Returns the configuration of this session manager.
-     */
-    IoSessionManagerConfig getConfig();
-    
-    /**
      * Returns the filter chain that filters all events which is related
      * with sessions this manager manages.
      */

Modified: directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptor.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptor.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoAcceptor.java Wed
Oct 19 06:08:05 2005
@@ -24,7 +24,7 @@
 import org.apache.mina.common.IoSession;
 
 /**
- * Base implementation of {@link IoAcceptor}s.
+ * A base implementation of {@link IoAcceptor}.
  * 
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$

Added: directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java?rev=326548&view=auto
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java (added)
+++ directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java Wed
Oct 19 06:08:05 2005
@@ -0,0 +1,55 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.mina.common.support;
+
+import org.apache.mina.common.IoConnector;
+
+/**
+ * A base implementation of {@link IoConnector}.
+ * 
+ * @author Trustin Lee (trustin@apache.org)
+ * @version $Rev$, $Date$
+ */
+public abstract class BaseIoConnector extends BaseIoSessionManager implements IoConnector
+{
+    private int defaultConnectTimeout = 60; // 1 minute
+
+    protected BaseIoConnector()
+    {
+    }
+    
+    public int getConnectTimeout()
+    {
+        return defaultConnectTimeout;
+    }
+
+    public long getConnectTimeoutMillis()
+    {
+        return defaultConnectTimeout * 1000L;
+    }
+
+    public void setConnectTimeout( int defaultConnectTimeout )
+    {
+        if( defaultConnectTimeout <= 0 )
+        {
+            throw new IllegalArgumentException( "defaultConnectTimeout: " + defaultConnectTimeout
);
+        }
+        this.defaultConnectTimeout = defaultConnectTimeout;
+    }    
+}

Propchange: directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoConnector.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
Wed Oct 19 06:08:05 2005
@@ -26,7 +26,6 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.transport.socket.nio.support.DatagramAcceptorImpl;
 
 /**
@@ -52,11 +51,6 @@
     public IoSession newSession( SocketAddress remoteAddress, SocketAddress localAddress
)
     {
         return stub.newSession( remoteAddress, localAddress );
-    }
-
-    public IoSessionManagerConfig getConfig()
-    {
-        return stub.getConfig();
     }
 
     public IoFilterChain getFilterChain()

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Wed Oct 19 06:08:05 2005
@@ -26,7 +26,6 @@
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.transport.socket.nio.support.DatagramConnectorImpl;
 
 /**
@@ -62,15 +61,6 @@
         return stub.getFilterChain();
     }
 
-    /**
-     * This method just returns dummy configuration instance because datagram
-     * transport type (UDP/IP) doesn't provide any configuration.
-     */
-    public IoSessionManagerConfig getConfig()
-    {
-        return stub.getConfig();
-    }
-
     public ExceptionMonitor getExceptionMonitor()
     {
         return stub.getExceptionMonitor();
@@ -79,5 +69,20 @@
     public void setExceptionMonitor( ExceptionMonitor monitor )
     {
         stub.setExceptionMonitor( monitor );
+    }
+
+    public int getConnectTimeout()
+    {
+        return stub.getConnectTimeout();
+    }
+
+    public long getConnectTimeoutMillis()
+    {
+        return stub.getConnectTimeoutMillis();
+    }
+
+    public void setConnectTimeout( int connectTimeout )
+    {
+        stub.setConnectTimeout( connectTimeout );
     }
 }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
Wed Oct 19 06:08:05 2005
@@ -33,7 +33,6 @@
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.common.support.BaseIoAcceptor;
 import org.apache.mina.common.support.IoSessionManagerFilterChain;
 import org.apache.mina.transport.socket.nio.support.SocketIoProcessor;
@@ -52,10 +51,13 @@
     private static volatile int nextId = 0;
 
     private final int id = nextId ++ ;
-    private final SocketAcceptorConfig config = new SocketAcceptorConfig(); 
 
     private final IoSessionManagerFilterChain filters = new SocketSessionManagerFilterChain(
this );
     
+    private boolean reuseAddress = false;
+    private int backlog = 50;
+    private int receiveBufferSize = -1;
+
     private Selector selector;
     private final Map channels = new HashMap();
 
@@ -72,11 +74,6 @@
     {
     }
 
-    public IoSessionManagerConfig getConfig()
-    {
-        return config;
-    }
-
     /**
      * Binds to the specified <code>address</code> and handles incoming
      * connections with the specified <code>handler</code>.  Backlog value
@@ -346,14 +343,14 @@
                 ssc.configureBlocking( false );
                 
                 // Configure the server socket,
-                ssc.socket().setReuseAddress( config.isReuseAddress() );
-                if( config.getReceiveBufferSize() > 0 )
+                ssc.socket().setReuseAddress( isReuseAddress() );
+                if( getReceiveBufferSize() > 0 )
                 {
-                    ssc.socket().setReceiveBufferSize( config.getReceiveBufferSize() );
+                    ssc.socket().setReceiveBufferSize( getReceiveBufferSize() );
                 }
                 
                 // and bind.
-                ssc.socket().bind( req.address, config.getBacklog() );
+                ssc.socket().bind( req.address, getBacklog() );
                 ssc.register( selector, SelectionKey.OP_ACCEPT, req );
 
                 channels.put( req.address, ssc );
@@ -447,6 +444,43 @@
     public IoFilterChain getFilterChain()
     {
         return filters;
+    }
+
+    public int getReceiveBufferSize()
+    {
+        return receiveBufferSize;
+    }
+
+    /**
+     * @param receiveBufferSize <tt>-1</tt> to use the default value.
+     */
+    public void setReceiveBufferSize( int receiveBufferSize )
+    {
+        this.receiveBufferSize = receiveBufferSize;
+    }
+
+    public boolean isReuseAddress()
+    {
+        return reuseAddress;
+    }
+
+    public void setReuseAddress( boolean reuseAddress )
+    {
+        this.reuseAddress = reuseAddress;
+    }
+
+    public int getBacklog()
+    {
+        return backlog;
+    }
+
+    public void setBacklog( int backlog )
+    {
+        if( backlog <= 0 )
+        {
+            throw new IllegalArgumentException( "backlog: " + backlog );
+        }
+        this.backlog = backlog;
     }
 
     private static class RegistrationRequest

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketConnector.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketConnector.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketConnector.java
Wed Oct 19 06:08:05 2005
@@ -30,12 +30,9 @@
 
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
-import org.apache.mina.common.IoConnectorConfig;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
-import org.apache.mina.common.support.BaseIoConnectorConfig;
-import org.apache.mina.common.support.BaseIoSessionManager;
+import org.apache.mina.common.support.BaseIoConnector;
 import org.apache.mina.common.support.IoSessionManagerFilterChain;
 import org.apache.mina.transport.socket.nio.support.SocketIoProcessor;
 import org.apache.mina.transport.socket.nio.support.SocketSession;
@@ -49,12 +46,11 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public class SocketConnector extends BaseIoSessionManager implements IoConnector
+public class SocketConnector extends BaseIoConnector
 {
     private static volatile int nextId = 0;
 
     private final int id = nextId++;
-    private final IoConnectorConfig config = new BaseIoConnectorConfig();
 
     private final IoSessionManagerFilterChain filters = new SocketSessionManagerFilterChain(
this );
 
@@ -123,7 +119,7 @@
             }
         }
         
-        ConnectionRequest request = new ConnectionRequest( ch, config.getConnectTimeout(),
handler );
+        ConnectionRequest request = new ConnectionRequest( ch, getConnectTimeout(), handler
);
         synchronized( this )
         {
             synchronized( connectQueue )
@@ -342,10 +338,5 @@
     public IoFilterChain getFilterChain()
     {
         return filters;
-    }
-
-    public IoSessionManagerConfig getConfig()
-    {
-        return config;
     }
 }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorImpl.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorImpl.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorImpl.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorImpl.java
Wed Oct 19 06:08:05 2005
@@ -34,10 +34,8 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.common.support.BaseIoAcceptor;
-import org.apache.mina.common.support.BaseIoAcceptorConfig;
 import org.apache.mina.common.support.IoSessionManagerFilterChain;
 import org.apache.mina.util.ExceptionUtil;
 import org.apache.mina.util.Queue;
@@ -566,15 +564,6 @@
         }
     }
     
-    /**
-     * This method just returns dummy configuration instance because datagram
-     * transport type (UDP/IP) doesn't provide any configuration.
-     */
-    public IoSessionManagerConfig getConfig()
-    {
-        return new BaseIoAcceptorConfig();
-    }
-
     public IoFilterChain getFilterChain()
     {
         return filters;

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorImpl.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorImpl.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorImpl.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorImpl.java
Wed Oct 19 06:08:05 2005
@@ -32,10 +32,8 @@
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.common.IoFilter.WriteRequest;
-import org.apache.mina.common.support.BaseIoConnectorConfig;
-import org.apache.mina.common.support.BaseIoSessionManager;
+import org.apache.mina.common.support.BaseIoConnector;
 import org.apache.mina.common.support.IoSessionManagerFilterChain;
 import org.apache.mina.util.Queue;
 
@@ -45,7 +43,7 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public class DatagramConnectorImpl extends BaseIoSessionManager implements IoConnector, DatagramSessionManager
+public class DatagramConnectorImpl extends BaseIoConnector implements DatagramSessionManager
 {
     private static volatile int nextId = 0;
 
@@ -490,14 +488,5 @@
             this.channel = channel;
             this.handler = handler;
         }
-    }
-
-    /**
-     * This method just returns dummy configuration instance because datagram
-     * transport type (UDP/IP) doesn't provide any configuration.
-     */
-    public IoSessionManagerConfig getConfig()
-    {
-        return new BaseIoConnectorConfig();
     }
 }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
Wed Oct 19 06:08:05 2005
@@ -10,9 +10,7 @@
 
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
 import org.apache.mina.common.support.BaseIoAcceptor;
-import org.apache.mina.common.support.BaseIoAcceptorConfig;
 import org.apache.mina.transport.vmpipe.support.VmPipe;
 import org.apache.mina.transport.vmpipe.support.VmPipeFilter;
 import org.apache.mina.transport.vmpipe.support.VmPipeSessionManagerFilterChain;
@@ -83,15 +81,6 @@
         }
     }
     
-    /**
-     * This method just returns dummy configuration instance because in-VM pipe
-     * transport type doesn't provide any configuration.
-     */
-    public IoSessionManagerConfig getConfig()
-    {
-        return new BaseIoAcceptorConfig();
-    }
-
     public IoFilterChain getFilterChain()
     {
         return filterChain;

Modified: directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java?rev=326548&r1=326547&r2=326548&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
Wed Oct 19 06:08:05 2005
@@ -7,12 +7,9 @@
 import java.net.SocketAddress;
 
 import org.apache.mina.common.ConnectFuture;
-import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSessionManagerConfig;
-import org.apache.mina.common.support.BaseIoConnectorConfig;
-import org.apache.mina.common.support.BaseIoSessionManager;
+import org.apache.mina.common.support.BaseIoConnector;
 import org.apache.mina.transport.vmpipe.support.VmPipe;
 import org.apache.mina.transport.vmpipe.support.VmPipeFilter;
 import org.apache.mina.transport.vmpipe.support.VmPipeIdleStatusChecker;
@@ -27,7 +24,7 @@
  * @author Trustin Lee (trustin@apache.org)
  * @version $Rev$, $Date$
  */
-public class VmPipeConnector extends BaseIoSessionManager implements IoConnector
+public class VmPipeConnector extends BaseIoConnector
 {
     private final VmPipeSessionManagerFilterChain filterChain =
         new VmPipeSessionManagerFilterChain( this );
@@ -47,15 +44,6 @@
         }
     }
     
-    /**
-     * This method just returns dummy configuration instance because in-VM pipe
-     * transport type doesn't provide any configuration.
-     */
-    public IoSessionManagerConfig getConfig()
-    {
-        return new BaseIoConnectorConfig();
-    }
-
     public IoFilterChain getFilterChain()
     {
         return filterChain;



Mime
View raw message