cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1153613 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ServerImpl.java
Date Wed, 03 Aug 2011 19:04:52 GMT
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() {



Mime
View raw message