directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r370980 - in /directory/sandbox/trustin/mina-spi/examples/src: main/java/org/apache/mina/examples/echoserver/ main/java/org/apache/mina/examples/httpserver/ main/java/org/apache/mina/examples/netcat/ main/java/org/apache/mina/examples/rever...
Date Sat, 21 Jan 2006 04:36:33 GMT
Author: trustin
Date: Fri Jan 20 20:36:25 2006
New Revision: 370980

URL: http://svn.apache.org/viewcvs?rev=370980&view=rev
Log:
Removed unnecessary instantiation of IoAddress in examples

Modified:
    directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/echoserver/Main.java
    directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/httpserver/Main.java
    directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/netcat/Main.java
    directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/reverser/Main.java
    directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/tennis/Main.java
    directory/sandbox/trustin/mina-spi/examples/src/test/java/org/apache/mina/examples/echoserver/AbstractTest.java

Modified: directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/echoserver/Main.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/echoserver/Main.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/echoserver/Main.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/echoserver/Main.java
Fri Jan 20 20:36:25 2006
@@ -19,7 +19,6 @@
 package org.apache.mina.examples.echoserver;
 
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
-import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.MINA;
 import org.apache.mina.examples.echoserver.ssl.BogusSSLContextFactory;
 import org.apache.mina.filter.LoggingFilter;
@@ -52,7 +51,7 @@
         addLogger( chain );
         
         // Bind
-        MINA.bind( new IoAddress( "nio:socket:*:" + PORT ), new EchoProtocolHandler(), chain
);
+        MINA.bind( "nio:socket:*:" + PORT, new EchoProtocolHandler(), chain );
 
         System.out.println( "Listening on port " + PORT );
     }

Modified: directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/httpserver/Main.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/httpserver/Main.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/httpserver/Main.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/httpserver/Main.java
Fri Jan 20 20:36:25 2006
@@ -19,7 +19,6 @@
 package org.apache.mina.examples.httpserver;
 
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
-import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.MINA;
 import org.apache.mina.examples.echoserver.ssl.BogusSSLContextFactory;
 import org.apache.mina.filter.SSLFilter;
@@ -48,7 +47,7 @@
         }
 
         // Bind
-        MINA.bind( new IoAddress( "nio:socket:*:" + PORT ), new HttpProtocolHandler(), chain
);
+        MINA.bind( "nio:socket:*:" + PORT, new HttpProtocolHandler(), chain );
         System.out.println( "Listening on port " + PORT );
     }
 

Modified: directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/netcat/Main.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/netcat/Main.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/netcat/Main.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/netcat/Main.java
Fri Jan 20 20:36:25 2006
@@ -18,7 +18,6 @@
  */
 package org.apache.mina.examples.netcat;
 
-import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.MINA;
 
 /**
@@ -42,7 +41,7 @@
         
         // Start communication.
         MINA.connect( 
-                new IoAddress( "nio:socket:" + args[0] + ':' + args[1] ),
+                "nio:socket:" + args[0] + ':' + args[1],
                 new NetCatProtocolHandler() );
     }
 }

Modified: directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/reverser/Main.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/reverser/Main.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/reverser/Main.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/reverser/Main.java
Fri Jan 20 20:36:25 2006
@@ -18,7 +18,6 @@
  */
 package org.apache.mina.examples.reverser;
 
-import org.apache.mina.common.IoAddress;
 import org.apache.mina.common.MINA;
 
 /**
@@ -36,7 +35,7 @@
     {
         // Bind
         MINA.bind(
-                new IoAddress( "nio:socket:*:" + PORT ),
+                "nio:socket:*:" + PORT,
                 new ReverseProtocolHandler() );
 
         System.out.println( "Listening on port " + PORT );

Modified: directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/tennis/Main.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/tennis/Main.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/tennis/Main.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/tennis/Main.java
Fri Jan 20 20:36:25 2006
@@ -28,7 +28,7 @@
     public static void main( String[] args ) throws Exception
     {
         // Set up server
-        MINA.bind( new IoAddress( "vm:pipe:8080" ), new TennisPlayer() );
+        MINA.bind( "vm:pipe:8080", new TennisPlayer() );
 
         // Connect to the server.
         ConnectFuture future = MINA.connect(

Modified: directory/sandbox/trustin/mina-spi/examples/src/test/java/org/apache/mina/examples/echoserver/AbstractTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/examples/src/test/java/org/apache/mina/examples/echoserver/AbstractTest.java?rev=370980&r1=370979&r2=370980&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/examples/src/test/java/org/apache/mina/examples/echoserver/AbstractTest.java
(original)
+++ directory/sandbox/trustin/mina-spi/examples/src/test/java/org/apache/mina/examples/echoserver/AbstractTest.java
Fri Jan 20 20:36:25 2006
@@ -88,7 +88,7 @@
             
             try
             {
-                MINA.bind( new IoAddress( "nio:socket:*:" + port ), new EchoProtocolHandler()
+                MINA.bind( "nio:socket:*:" + port, new EchoProtocolHandler()
                 {
                     // This is for TLS reentrance test
                     public void messageReceived( IoSession session, Object message ) throws
Exception
@@ -119,7 +119,7 @@
                 } );
                 socketBound = true;
 
-                MINA.bind( new IoAddress( "nio:datagram:*:" + port ), new EchoProtocolHandler()
);
+                MINA.bind( "nio:datagram:*:" + port, new EchoProtocolHandler() );
                 datagramBound = true;
 
                 break;
@@ -131,8 +131,8 @@
             {
                 if( !socketBound || !datagramBound )
                 {
-                    MINA.unbind( new IoAddress( "nio:socket:*:" + port ) );
-                    MINA.unbind( new IoAddress( "nio:datagram:*:" + port ) );
+                    MINA.unbind( "nio:socket:*:" + port );
+                    MINA.unbind( "nio:datagram:*:" + port );
                 }
             }
         }



Mime
View raw message