directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r122610 - /incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java /incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/SimpleService.java
Date Fri, 17 Dec 2004 02:58:15 GMT
Author: trustin
Date: Thu Dec 16 18:58:13 2004
New Revision: 122610

URL: http://svn.apache.org/viewcvs?view=rev&rev=122610
Log:
Added: SimpleService
Removed sessionHandler property from Service
Added:
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/SimpleService.java
  (contents, props changed)
Modified:
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java?view=diff&rev=122610&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java&r1=122609&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java&r2=122610
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/Service.java
Thu Dec 16 18:58:13 2004
@@ -19,8 +19,6 @@
  */
 package org.apache.mina.registry;
 
-import org.apache.mina.io.IoSessionHandler;
-
 
 /**
  * TODO Insert type comment.
@@ -34,6 +32,4 @@
     TransportType getTransportType();
 
     int getPort();
-
-    IoSessionHandler getSessionHandler();
 }

Added: incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/SimpleService.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/SimpleService.java?view=auto&rev=122610
==============================================================================
--- (empty file)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/registry/SimpleService.java
Thu Dec 16 18:58:13 2004
@@ -0,0 +1,42 @@
+/*
+ * @(#) $Id$
+ */
+package org.apache.mina.registry;
+
+/**
+ * TODO Document me.
+ * 
+ * @author Trustin Lee (trustin@apache.org)
+ * @version $Rev$, $Date$
+ */
+public class SimpleService implements Service {
+    
+    private final String name;
+    private final TransportType transportType;
+    private final int port;
+
+    public SimpleService(String name, TransportType transportType, int port) {
+        if (name == null)
+            throw new NullPointerException("name");
+        if (transportType == null)
+            throw new NullPointerException("transportType");
+        if (port < 0 || port > 65535)
+            throw new IllegalArgumentException("port: " + port);
+
+        this.name = name;
+        this.transportType = transportType;
+        this.port = port;
+    }
+    
+    public String getName() {
+        return name;
+    }
+
+    public TransportType getTransportType() {
+        return transportType;
+    }
+
+    public int getPort() {
+        return port;
+    }
+}

Mime
View raw message