directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r371220 - in /directory/sandbox/trustin/mina-spi/core/src: main/java/org/apache/mina/common/ main/java/org/apache/mina/common/support/ main/java/org/apache/mina/transport/socket/nio/ main/java/org/apache/mina/transport/vmpipe/ test/java/org...
Date Sun, 22 Jan 2006 06:46:57 GMT
Author: trustin
Date: Sat Jan 21 22:46:41 2006
New Revision: 371220

URL: http://svn.apache.org/viewcvs?rev=371220&view=rev
Log:
Renamed MINA to IoService

Added:
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/IoService.java
      - copied, changed from r371201, directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/MINA.java
Removed:
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/MINA.java
Modified:
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/support/AbstractIoFilterChain.java
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSession.java
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSession.java
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
    directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/IoFilterChainTest.java
    directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/ServiceProviderTest.java
    directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java
    directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractBindTest.java
    directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractTrafficControlTest.java

Copied: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/IoService.java
(from r371201, directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/MINA.java)
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/IoService.java?p2=directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/IoService.java&p1=directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/MINA.java&r1=371201&r2=371220&rev=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/MINA.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/IoService.java
Sat Jan 21 22:46:41 2006
@@ -38,7 +38,7 @@
  * @author The Apache Directory Project (dev@directory.apache.org)
  * @version $Rev$, $Date$
  */
-public class MINA
+public class IoService
 {
     private static final Map providers = new HashMap();
 
@@ -437,7 +437,7 @@
         return new IoAddress( addr );
     }
     
-    private MINA()
+    private IoService()
     {
     }
 }

Modified: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/support/AbstractIoFilterChain.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/support/AbstractIoFilterChain.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/support/AbstractIoFilterChain.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/common/support/AbstractIoFilterChain.java
Sat Jan 21 22:46:41 2006
@@ -31,7 +31,7 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoFilterLifeCycleException;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoFilter.NextFilter;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.util.ByteBufferUtil;
@@ -129,7 +129,7 @@
                 {
                     throw new IllegalStateException(
                             "Write requests must be transformed to " + 
-                            MINA.getProvider( session.getRemoteAddress() ).getEnvelopeType()
+
+                            IoService.getProvider( session.getRemoteAddress() ).getEnvelopeType()
+
                             ": " + writeRequest );
                 }
             }

Modified: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSession.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSession.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSession.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSession.java
Sat Jan 21 22:46:41 2006
@@ -28,7 +28,7 @@
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoServiceProvider;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.common.support.BaseIoSession;
 import org.apache.mina.util.Queue;
@@ -72,7 +72,7 @@
 
     public IoServiceProvider getProvider()
     {
-        return MINA.getProvider( "nio", "datagram" );
+        return IoService.getProvider( "nio", "datagram" );
     }
 
     public IoFilterChain getFilterChain()

Modified: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSession.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSession.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSession.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSession.java
Sat Jan 21 22:46:41 2006
@@ -29,7 +29,7 @@
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoServiceProvider;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.common.support.BaseIoSession;
 import org.apache.mina.util.Queue;
@@ -79,7 +79,7 @@
     
     public IoServiceProvider getProvider()
     {
-        return MINA.getProvider( "nio", "socket" );
+        return IoService.getProvider( "nio", "socket" );
     }
 
     public IoFilterChain getFilterChain()

Modified: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
Sat Jan 21 22:46:41 2006
@@ -14,7 +14,7 @@
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoServiceProvider;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.common.support.BaseIoSession;
 import org.apache.mina.filter.codec.ProtocolDecoder;
@@ -114,7 +114,7 @@
     
     public IoServiceProvider getProvider()
     {
-        return MINA.getProvider( "vm", "pipe" );
+        return IoService.getProvider( "vm", "pipe" );
     }
 
     public IoFilterChain getFilterChain()

Modified: directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/IoFilterChainTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/IoFilterChainTest.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/IoFilterChainTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/IoFilterChainTest.java
Sat Jan 21 22:46:41 2006
@@ -292,7 +292,7 @@
 
         public IoServiceProvider getProvider()
         {
-            return MINA.getProvider( "vm", "pipe" );
+            return IoService.getProvider( "vm", "pipe" );
         }
     }
 

Modified: directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/ServiceProviderTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/ServiceProviderTest.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/ServiceProviderTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/common/ServiceProviderTest.java
Sat Jan 21 22:46:41 2006
@@ -37,7 +37,7 @@
 
     public void testDefaultProviders()
     {
-        Set providers = MINA.getProviders();
+        Set providers = IoService.getProviders();
         Assert.assertEquals( 3, providers.size() );
 
         List providerClassNames = new ArrayList();

Modified: directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java
Sat Jan 21 22:46:41 2006
@@ -32,7 +32,7 @@
 import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoFilter.NextFilter;
 import org.apache.mina.common.IoFilter.WriteRequest;
 import org.apache.mina.util.AvailablePortFinder;
@@ -320,7 +320,7 @@
         SenderHandler sender = new SenderHandler( stream );
         ReceiverHandler receiver = new ReceiverHandler( stream.size );
         
-        MINA.bind( address, sender );
+        IoService.bind( address, sender );
         
         synchronized( sender.lock )
         {
@@ -328,14 +328,14 @@
             {
                 DefaultIoFilterChainBuilder chain = new DefaultIoFilterChainBuilder();
                 chain.addFirst( "threadPool", new ThreadPoolFilter() );
-                MINA.connect( address, receiver, chain );
+                IoService.connect( address, receiver, chain );
                 
                 sender.lock.wait();
                 receiver.lock.wait();
             }
         }
         
-        MINA.unbind( address );
+        IoService.unbind( address );
         
         assertEquals( stream.bytesRead, receiver.bytesRead );
         assertEquals( stream.size, receiver.bytesRead );

Modified: directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractBindTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractBindTest.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractBindTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractBindTest.java
Sat Jan 21 22:46:41 2006
@@ -29,7 +29,7 @@
 import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoServiceProvider.IoAcceptor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -65,7 +65,7 @@
             socketBound = false;
             try
             {
-                MINA.bind( createAddress( port ), new EchoProtocolHandler() );
+                IoService.bind( createAddress( port ), new EchoProtocolHandler() );
                 socketBound = true;
                 break;
             }
@@ -102,7 +102,7 @@
     {
         try
         {
-            MINA.unbind( createAddress( port ) );
+            IoService.unbind( createAddress( port ) );
         }
         catch( Exception e )
         {
@@ -116,7 +116,7 @@
         
         try
         {
-            MINA.bind( createAddress( port ), new EchoProtocolHandler() );
+            IoService.bind( createAddress( port ), new EchoProtocolHandler() );
             Assert.fail( "IOException is not thrown" );
         }
         catch( IOException e )
@@ -129,12 +129,12 @@
         bind( false );
         
         // this should succeed
-        MINA.unbind( createAddress( port ) );
+        IoService.unbind( createAddress( port ) );
         
         try
         {
             // this should fail
-            MINA.unbind( createAddress( port ) );
+            IoService.unbind( createAddress( port ) );
             Assert.fail( "Exception is not thrown" );
         }
         catch( Exception e )
@@ -150,8 +150,8 @@
         EchoProtocolHandler handler = new EchoProtocolHandler();
         for( int i = 0; i < 1024; i++ ) 
         {
-            MINA.unbind( addr );
-            MINA.bind( addr, handler );
+            IoService.unbind( addr );
+            IoService.bind( addr, handler );
         }
     }
     
@@ -163,7 +163,7 @@
         EchoProtocolHandler handler = new EchoProtocolHandler();
         for( int i = 0; i < 1048576; i++ )
         {
-            MINA.bind( addr, handler );
+            IoService.bind( addr, handler );
             testDuplicateBind();
             testDuplicateUnbind();
             if( i % 100 == 0 )

Modified: directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractTrafficControlTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractTrafficControlTest.java?rev=371220&r1=371219&r2=371220&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractTrafficControlTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/test/java/org/apache/mina/transport/AbstractTrafficControlTest.java
Sat Jan 21 22:46:41 2006
@@ -25,7 +25,7 @@
 import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.MINA;
+import org.apache.mina.common.IoService;
 import org.apache.mina.util.AvailablePortFinder;
 
 /**
@@ -53,13 +53,13 @@
         this.bindAddress = createBindAddress( port );
         this.connectAddress = createConnectAddress( port );
         
-        MINA.bind( bindAddress, new ServerIoHandler() );
+        IoService.bind( bindAddress, new ServerIoHandler() );
     }
 
     protected void tearDown() throws Exception
     {
         super.tearDown();
-        MINA.unbind( bindAddress );
+        IoService.unbind( bindAddress );
     }
 
     protected abstract IoAddress createBindAddress( int port );
@@ -67,7 +67,7 @@
     
     public void testSuspendResumeReadWrite() throws Exception
     {
-        ConnectFuture future = MINA.connect( connectAddress, new ClientIoHandler() );
+        ConnectFuture future = IoService.connect( connectAddress, new ClientIoHandler() );
         future.join();
         IoSession session = future.getSession();
         



Mime
View raw message