directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r169285 - in /directory/network/branches/api_integration/src: java/org/apache/mina/transport/vmpipe/AnonymousVmPipeAddress.java java/org/apache/mina/transport/vmpipe/VmPipeConnector.java java/org/apache/mina/util/AnonymousSocketAddress.java test/org/apache/mina/examples/echoserver/ConnectorTest.java
Date Mon, 09 May 2005 11:27:10 GMT
Author: trustin
Date: Mon May  9 04:27:09 2005
New Revision: 169285

URL: http://svn.apache.org/viewcvs?rev=169285&view=rev
Log:
Moved AnonymousVmPipeAddress to util.AnonymousSocketAddress

Added:
    directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java
  (with props)
Removed:
    directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/AnonymousVmPipeAddress.java
Modified:
    directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
    directory/network/branches/api_integration/src/test/org/apache/mina/examples/echoserver/ConnectorTest.java

Modified: directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java?rev=169285&r1=169284&r2=169285&view=diff
==============================================================================
--- directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
(original)
+++ directory/network/branches/api_integration/src/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
Mon May  9 04:27:09 2005
@@ -12,6 +12,7 @@
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.transport.vmpipe.VmPipeAcceptor.Entry;
+import org.apache.mina.util.AnonymousSocketAddress;
 
 /**
  * Connects to {@link IoHandler}s which is bound on the specified
@@ -68,7 +69,7 @@
             throw new IOException( "Endpoint unavailable: " + address );
 
         VmPipeSession session = new VmPipeSession( new Object(), // lock
-                                                   AnonymousVmPipeAddress.INSTANCE,
+                                                   AnonymousSocketAddress.INSTANCE,
                                                    filterChain,
                                                    handler,
                                                    entry );

Added: directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java?rev=169285&view=auto
==============================================================================
--- directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java
(added)
+++ directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java
Mon May  9 04:27:09 2005
@@ -0,0 +1,50 @@
+/*
+ * @(#) $Id$
+ */
+package org.apache.mina.util;
+
+import java.net.SocketAddress;
+
+/**
+ * A {@link SocketAddress} which represents anonymous address.
+ * 
+ * @author Trustin Lee (trustin@apache.org)
+ * @version $Rev$, $Date$
+ */
+public class AnonymousSocketAddress extends SocketAddress implements Comparable
+{
+    private static final long serialVersionUID = 3978421416766944048L;
+
+    public static final AnonymousSocketAddress INSTANCE = new AnonymousSocketAddress();
+
+    /**
+     * Creates a new instance with the specifid port number.
+     */
+    private AnonymousSocketAddress()
+    {
+    }
+
+    public int hashCode()
+    {
+        return 1432482932;
+    }
+
+    public boolean equals( Object o )
+    {
+        if( o == null )
+            return false;
+        if( this == o )
+            return true;
+        return o instanceof AnonymousSocketAddress;
+    }
+
+    public int compareTo( Object o )
+    {
+        return this.hashCode() - ( ( AnonymousSocketAddress ) o ).hashCode();
+    }
+
+    public String toString()
+    {
+        return "anonymous";
+    }
+}
\ No newline at end of file

Propchange: directory/network/branches/api_integration/src/java/org/apache/mina/util/AnonymousSocketAddress.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: directory/network/branches/api_integration/src/test/org/apache/mina/examples/echoserver/ConnectorTest.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/api_integration/src/test/org/apache/mina/examples/echoserver/ConnectorTest.java?rev=169285&r1=169284&r2=169285&view=diff
==============================================================================
--- directory/network/branches/api_integration/src/test/org/apache/mina/examples/echoserver/ConnectorTest.java
(original)
+++ directory/network/branches/api_integration/src/test/org/apache/mina/examples/echoserver/ConnectorTest.java
Mon May  9 04:27:09 2005
@@ -139,7 +139,6 @@
             fillWriteBuffer( buf, i );
             buf.flip();
 
-            // FIXME test virtual marker
             session.write( buf );
 
             // This will align message arrival order in UDP
@@ -203,20 +202,6 @@
         
         public void messageSent( IoSession session, Object message )
         {
-            // FIXME test virtual marker
-            //if( message != SSLFilter.SSL_MARKER )
-            //{
-            //    if( ( counter & 1 ) == 0 )
-            //    {
-            //        Assert.assertEquals( new Integer( counter ), message );
-            //    }
-            //    else
-            //    {
-            //        Assert.assertNull( message );
-            //    }
-            //    
-            //    counter ++;
-            //}
         }
 
         public void exceptionCaught( IoSession session, Throwable cause )



Mime
View raw message