directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r165529 - /directory/network/trunk/src/java/org/apache/mina/registry/Service.java
Date Sun, 01 May 2005 17:49:20 GMT
Author: trustin
Date: Sun May  1 10:49:19 2005
New Revision: 165529

URL: http://svn.apache.org/viewcvs?rev=165529&view=rev
Log:
Added a convenient constructor that accepts port number instead of socket address.

Modified:
    directory/network/trunk/src/java/org/apache/mina/registry/Service.java

Modified: directory/network/trunk/src/java/org/apache/mina/registry/Service.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/registry/Service.java?rev=165529&r1=165528&r2=165529&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/registry/Service.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/registry/Service.java Sun May  1 10:49:19
2005
@@ -19,6 +19,7 @@
 package org.apache.mina.registry;
 
 import java.io.Serializable;
+import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 
 import org.apache.mina.common.TransportType;
@@ -39,6 +40,15 @@
     private final TransportType transportType;
 
     private final SocketAddress address;
+
+    /**
+     * Creates a new instance with the specified protocol name, transport type,
+     * and port number to be bound.
+     */
+    public Service( String name, TransportType transportType, int port )
+    {
+        this( name, transportType, new InetSocketAddress( port ) );
+    }
 
     /**
      * Creates a new instance with the specified protocol name, transport type,



Mime
View raw message