directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 46270 - in incubator/directory/seda/trunk/src: java/org/apache/seda java/org/apache/seda/input java/org/apache/seda/stage test/org/apache/seda test/org/apache/seda/listener
Date Fri, 17 Sep 2004 21:16:04 GMT
Author: akarasulu
Date: Fri Sep 17 14:16:03 2004
New Revision: 46270

Added:
   incubator/directory/seda/trunk/src/java/org/apache/seda/input/TCPInputManager.java
      - copied, changed from rev 46257, incubator/directory/seda/trunk/src/java/org/apache/seda/input/DefaultInputManager.java
Removed:
   incubator/directory/seda/trunk/src/java/org/apache/seda/input/DefaultInputManager.java
Modified:
   incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontend.java
   incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontendFactory.java
   incubator/directory/seda/trunk/src/java/org/apache/seda/stage/LoggingStageMonitor.java
   incubator/directory/seda/trunk/src/test/org/apache/seda/DefaultFrontendFactoryTest.java
   incubator/directory/seda/trunk/src/test/org/apache/seda/listener/DefaultListenerManagerTest.java
Log:
cleaning up a few things that went a miss with patches

Modified: incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontend.java
==============================================================================
--- incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontend.java	(original)
+++ incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontend.java	Fri Sep 17
14:16:03 2004
@@ -25,9 +25,9 @@
 import org.apache.seda.encoder.EncoderManager;
 import org.apache.seda.encoder.DefaultEncoderManager;
 import org.apache.seda.input.InputManager;
-import org.apache.seda.input.DefaultInputManager;
+import org.apache.seda.input.TCPInputManager;
 import org.apache.seda.listener.ListenerManager;
-import org.apache.seda.listener.DefaultListenerManager;
+import org.apache.seda.listener.TCPListenerManager;
 import org.apache.seda.output.OutputManager;
 import org.apache.seda.output.DefaultOutputManager;
 import org.apache.seda.protocol.RequestProcessor;
@@ -84,8 +84,8 @@
 
     public void stop() throws Exception
     {
-        ( ( DefaultListenerManager ) srvMan ).stop();
-        ( ( DefaultInputManager ) inMan ).stop();
+        ( ( TCPListenerManager ) srvMan ).stop();
+        ( ( TCPInputManager ) inMan ).stop();
         ( ( DefaultOutputManager ) outMan ).stop();
         ( ( DefaultRequestProcessor ) reqProc ).stop();
         ( ( DefaultDecoderManager ) decMan ).stop();

Modified: incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontendFactory.java
==============================================================================
--- incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontendFactory.java	(original)
+++ incubator/directory/seda/trunk/src/java/org/apache/seda/DefaultFrontendFactory.java	Fri
Sep 17 14:16:03 2004
@@ -34,9 +34,9 @@
 import org.apache.seda.encoder.DefaultEncoderManager;
 import org.apache.seda.encoder.EncodeStageHandler;
 import org.apache.seda.listener.ListenerManager;
-import org.apache.seda.listener.DefaultListenerManager;
+import org.apache.seda.listener.TCPListenerManager;
 import org.apache.seda.input.InputManager;
-import org.apache.seda.input.DefaultInputManager;
+import org.apache.seda.input.TCPInputManager;
 import org.apache.seda.output.OutputManager;
 import org.apache.seda.output.DefaultOutputManager;
 import org.apache.commons.threadpool.DefaultThreadPool;
@@ -163,7 +163,7 @@
     private ListenerManager createListenerManager( EventRouter router )
         throws IOException, InterruptedException
     {
-        DefaultListenerManager listMan = new DefaultListenerManager( router );
+        TCPListenerManager listMan = new TCPListenerManager( router );
         listMan.start();
         return listMan;
     }
@@ -172,7 +172,7 @@
     private InputManager createInputManager( EventRouter router, BufferPool bp )
         throws IOException
     {
-        DefaultInputManager inMan = new DefaultInputManager( router, bp );
+        TCPInputManager inMan = new TCPInputManager( router, bp );
         inMan.start();
         return inMan;
     }

Copied: incubator/directory/seda/trunk/src/java/org/apache/seda/input/TCPInputManager.java
(from rev 46257, incubator/directory/seda/trunk/src/java/org/apache/seda/input/DefaultInputManager.java)
==============================================================================
--- incubator/directory/seda/trunk/src/java/org/apache/seda/input/DefaultInputManager.java
(original)
+++ incubator/directory/seda/trunk/src/java/org/apache/seda/input/TCPInputManager.java	Fri
Sep 17 14:16:03 2004
@@ -45,7 +45,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev: 1452 $
  */
-public class DefaultInputManager extends AbstractSubscriber
+public class TCPInputManager extends AbstractSubscriber
     implements InputManager, ConnectSubscriber, DisconnectSubscriber, Runnable
 {
     /** the thread driving this Runnable */ 
@@ -77,7 +77,7 @@
      * @param router an event router service
      * @param bp a buffer pool service
      */
-    public DefaultInputManager( EventRouter router, BufferPool bp )
+    public TCPInputManager( EventRouter router, BufferPool bp )
         throws IOException
     {
         this.bp = bp;
@@ -429,7 +429,7 @@
     {
         ConcreteInputEvent( ClientKey key, ByteBuffer buffer )
         {
-            super( DefaultInputManager.this, key, buffer );
+            super( TCPInputManager.this, key, buffer );
         }
         
         public ByteBuffer claimInterest( Object party )

Modified: incubator/directory/seda/trunk/src/java/org/apache/seda/stage/LoggingStageMonitor.java
==============================================================================
--- incubator/directory/seda/trunk/src/java/org/apache/seda/stage/LoggingStageMonitor.java
(original)
+++ incubator/directory/seda/trunk/src/java/org/apache/seda/stage/LoggingStageMonitor.java
Fri Sep 17 14:16:03 2004
@@ -184,9 +184,9 @@
      */
     public void stopping( Stage stage )
     {
-        if ( log.isInfoEnabled() )
+        if ( log.isDebugEnabled() )
         {
-            log.info( "Graceful shutdown of stage " 
+            log.debug( "Graceful shutdown of stage "
                     + stage.getConfig().getName() + " was requested" );
         }
     }
@@ -198,9 +198,9 @@
      */
     public void stopping( Stage stage, long millis )
     {
-        if ( log.isInfoEnabled() )
+        if ( log.isDebugEnabled() )
         {
-            log.info( "Waiting " + millis + " for graceful shutdown of stage " 
+            log.debug( "Waiting " + millis + " for graceful shutdown of stage "
                     + stage.getConfig().getName() );
         }
     }

Modified: incubator/directory/seda/trunk/src/test/org/apache/seda/DefaultFrontendFactoryTest.java
==============================================================================
--- incubator/directory/seda/trunk/src/test/org/apache/seda/DefaultFrontendFactoryTest.java
(original)
+++ incubator/directory/seda/trunk/src/test/org/apache/seda/DefaultFrontendFactoryTest.java
Fri Sep 17 14:16:03 2004
@@ -19,12 +19,14 @@
 
 import junit.framework.TestCase;
 import org.apache.seda.listener.ListenerConfig;
-import org.apache.seda.listener.DefaultListenerConfig;
+import org.apache.seda.listener.TCPListenerConfig;
+import org.apache.seda.listener.SocketListenerAddress;
 import org.apache.seda.protocol.InetServiceEntry;
 import org.apache.seda.examples.EchoProtocolProvider;
 import org.apache.commons.net.EchoTCPClient;
 
 import java.io.IOException;
+import java.net.InetAddress;
 
 
 /**
@@ -88,8 +90,8 @@
     public void testBind() throws IOException
     {
         ListenerConfig config = null;
-        config = new DefaultListenerConfig( new byte[] { 127,0,0,1}, 20, false,
-            new InetServiceEntry( "ldap", 10389 ) );
+        config = new TCPListenerConfig( new SocketListenerAddress(
+            InetAddress.getLocalHost() ), new InetServiceEntry( "ldap", 10389 ) );
         fe.getListenerManager().bind( config );
         fe.getListenerManager().unbind( config );
     }
@@ -98,13 +100,13 @@
     public void testEcho() throws IOException, InterruptedException
     {
         ListenerConfig config = null;
-        config = new DefaultListenerConfig( new byte[] { 127,0,0,1}, 20, false,
-            new InetServiceEntry( "echo", 7 ) );
+        config = new TCPListenerConfig( new SocketListenerAddress(
+            InetAddress.getByName( "millikan" ) ), new InetServiceEntry( "echo", 7 ) );
         fe.getListenerManager().bind( config );
         fe.register( new EchoProtocolProvider() );
 
         EchoTCPClient client = new EchoTCPClient();
-        client.connect( "localhost", 7 );
+        client.connect( InetAddress.getByName( "millikan" ), 7 );
         byte[] toSend = "Hello world!".getBytes();
         byte[] recieved = new byte[toSend.length];
         client.getOutputStream().write( toSend );

Modified: incubator/directory/seda/trunk/src/test/org/apache/seda/listener/DefaultListenerManagerTest.java
==============================================================================
--- incubator/directory/seda/trunk/src/test/org/apache/seda/listener/DefaultListenerManagerTest.java
(original)
+++ incubator/directory/seda/trunk/src/test/org/apache/seda/listener/DefaultListenerManagerTest.java
Fri Sep 17 14:16:03 2004
@@ -37,7 +37,7 @@
     /** An event router to use for testing */
     private EventRouter router = null;
     /** the defualt ListenerManager to test */
-    private DefaultListenerManager listener = null;
+    private TCPListenerManager listener = null;
     
     
 
@@ -49,7 +49,7 @@
         super.setUp();
         
         router = new DefaultEventRouter();
-        listener = new DefaultListenerManager( router );
+        listener = new TCPListenerManager( router );
         listener.start();
     }
 
@@ -79,16 +79,17 @@
 
     public void testBind() throws Exception
     {
-        listener.bind( new TCPListenerConfig(new SocketListenerAddress(InetAddress.getLocalHost()),
-                50, false, new InetServiceEntry( "ldap", 10389 ) ) );
+        listener.bind( new TCPListenerConfig(
+            new SocketListenerAddress(InetAddress.getLocalHost()),
+                new InetServiceEntry( "ldap", 10389 ) ) );
     }
 
     
     public void testUnbind() throws Exception
     {
-        ListenerConfig sl = new
-                TCPListenerConfig(new SocketListenerAddress(InetAddress.getLocalHost()),
50, false,
-                        new InetServiceEntry( "ldap", 10389 ) );
+        ListenerConfig sl = new TCPListenerConfig(
+            new SocketListenerAddress(InetAddress.getLocalHost()),
+                new InetServiceEntry( "ldap", 10389 ) );
         listener.bind( sl );
         listener.unbind( sl );
     }

Mime
View raw message