camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1242624 - in /camel/branches/camel-2.9.x: ./ camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
Date Fri, 10 Feb 2012 00:41:07 GMT
Author: hadrian
Date: Fri Feb 10 00:41:07 2012
New Revision: 1242624

URL: http://svn.apache.org/viewvc?rev=1242624&view=rev
Log:
Merged revisions 1236680 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1236680 | davsclaus | 2012-01-27 08:41:58 -0500 (Fri, 27 Jan 2012) | 1 line
  
  CAMEL-4941: Polished javadoc
........

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java?rev=1242624&r1=1242623&r2=1242624&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
Fri Feb 10 00:41:07 2012
@@ -101,9 +101,6 @@ public abstract class ServiceSupport imp
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#suspend()
-     */
     @Override
     public void suspend() throws Exception {
         if (!suspended.get()) {
@@ -126,9 +123,6 @@ public abstract class ServiceSupport imp
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#resume()
-     */
     @Override
     public void resume() throws Exception {
         if (suspended.get()) {
@@ -149,9 +143,6 @@ public abstract class ServiceSupport imp
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#shutdown()
-     */
     @Override
     public void shutdown() throws Exception {
         // ensure we are stopped first
@@ -168,9 +159,6 @@ public abstract class ServiceSupport imp
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#getStatus()
-     */
     @Override
     public ServiceStatus getStatus() {
         // lets check these in oldest first as these flags can be changing in a concurrent
world
@@ -197,64 +185,62 @@ public abstract class ServiceSupport imp
         return ServiceStatus.Stopped;
     }
     
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isStarted()
-     */
     @Override
     public boolean isStarted() {
         return started.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isStarting()
-     */
     @Override
     public boolean isStarting() {
         return starting.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isStopping()
-     */
     @Override
     public boolean isStopping() {
         return stopping.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isStopped()
-     */
     @Override
     public boolean isStopped() {
         return stopped.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isSuspending()
-     */
     @Override
     public boolean isSuspending() {
         return suspending.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isSuspended()
-     */
     @Override
     public boolean isSuspended() {
         return suspended.get();
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#isRunAllowed()
-     */
     @Override
     public boolean isRunAllowed() {
         return !(stopping.get() || stopped.get());
     }
 
+    /**
+     * Implementations override this method to support customized start/stop.
+     * <p/>
+     * <b>Important: </b> See {@link #doStop()} for more details.
+     * 
+     * @see #doStop()
+     */
     protected abstract void doStart() throws Exception;
 
+    /**
+     * Implementations override this method to support customized start/stop.
+     * <p/>
+     * <b>Important:</b> Camel will invoke this {@link #doStop()} method when
+     * the service is being stopped. This method will <b>also</b> be invoked
+     * if the service is still in <i>uninitialized</i> state (eg has not
+     * been started). The method is <b>always</b> called to allow the service
+     * to do custom logic when the service is being stopped, such as when
+     * {@link org.apache.camel.CamelContext} is shutting down.
+     * 
+     * @see #doStart() 
+     */
     protected abstract void doStop() throws Exception;
 
     /**
@@ -270,15 +256,12 @@ public abstract class ServiceSupport imp
     }
 
     /**
-     * Implementations override this method to perform customized shutdown
+     * Implementations override this method to perform customized shutdown.
      */
     protected void doShutdown() throws Exception {
         // noop
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.support.StatefulService#getVersion()
-     */
     @Override
     public synchronized String getVersion() {
         if (version != null) {



Mime
View raw message