james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1049061 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
Date Tue, 14 Dec 2010 12:20:05 GMT
Author: norman
Date: Tue Dec 14 12:20:04 2010
New Revision: 1049061

URL: http://svn.apache.org/viewvc?rev=1049061&view=rev
Log:
Rename methods to better reflect usage

Modified:
    james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java

Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java?rev=1049061&r1=1049060&r2=1049061&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
(original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
Tue Dec 14 12:20:04 2010
@@ -98,7 +98,7 @@ public abstract class AbstractAsyncServe
      * @throws Exception 
      * 
      */
-    public synchronized void start() throws Exception {
+    public synchronized void bind() throws Exception {
         if (started) throw new IllegalStateException("Server running already");
 
         if (port < 1) throw new RuntimeException("Please specify a port to which the server
should get bound!");
@@ -128,7 +128,7 @@ public abstract class AbstractAsyncServe
     /**
      * Stop the server
      */
-    public synchronized void stop() {
+    public synchronized void unbind() {
         if (started == false) return;
         channels.close().awaitUninterruptibly();
         bootstrap.releaseExternalResources();
@@ -221,4 +221,13 @@ public abstract class AbstractAsyncServe
     protected Executor createWorkerExecutor() {
         return Executors.newCachedThreadPool();
     }
+    
+    /**
+     * return true if the server is bound 
+     * 
+     * @return bound
+     */
+    public synchronized boolean isBound() {
+        return started;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message