You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/08/03 21:04:52 UTC

svn commit: r1153613 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

Author: dkulp
Date: Wed Aug  3 19:04:51 2011
New Revision: 1153613

URL: http://svn.apache.org/viewvc?rev=1153613&view=rev
Log:
[CXF-3700] Add a flag to record if the server is stopped or not

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java?rev=1153613&r1=1153612&r2=1153613&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java Wed Aug  3 19:04:51 2011
@@ -48,6 +48,7 @@ public class ServerImpl implements Serve
     private BindingFactory bindingFactory;
     private MessageObserver messageObserver;
     private ManagedEndpoint mep;
+    private boolean stopped;
 
     public ServerImpl(Bus bus, 
                       Endpoint endpoint, 
@@ -136,9 +137,18 @@ public class ServerImpl implements Serve
         if (slcMgr != null) {
             slcMgr.startServer(this);
         }
+        stopped = false;
+    }
+    
+    public boolean isStopped() {
+        return stopped;
     }
 
     public void stop() {
+        if (stopped) {
+            return;
+        }
+        
         LOG.fine("Server is stopping.");
         
         if (slcMgr != null) {
@@ -159,6 +169,7 @@ public class ServerImpl implements Serve
         }
         getDestination().shutdown();
         getDestination().setMessageObserver(null);
+        stopped = true;
     }
     
     public void destroy() {