Updated Branches:
  refs/heads/camel-2.11.x 7a5f9c50c -> e348badd8

CAMEL-6951: Improve ServiceHelper utility class.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e348badd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e348badd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e348badd

Branch: refs/heads/camel-2.11.x
Commit: e348badd838428b701a56d7a44953750f433c425
Parents: 7a5f9c5
Author: Babak Vahdat <[email protected]>
Authored: Sun Nov 10 21:15:11 2013 +0100
Committer: Babak Vahdat <[email protected]>
Committed: Sun Nov 10 21:16:55 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/util/ServiceHelper.java    | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e348badd/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java 
b/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
index f2edebf..b184e25 100644
--- a/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
@@ -396,9 +396,11 @@ public final class ServiceHelper {
     }
 
     /**
-     * Is the given service stopping or stopped?
+     * Is the given service stopping or already stopped?
      *
-     * @return <tt>true</tt> if already stopped, <tt>false</tt> otherwise
+     * @return <tt>true</tt> if stopping or already stopped, <tt>false</tt> 
otherwise
+     * @see StatefulService#isStopping()
+     * @see StatefulService#isStopped()
      */
     public static boolean isStopped(Object value) {
         if (value instanceof StatefulService) {
@@ -411,9 +413,11 @@ public final class ServiceHelper {
     }
 
     /**
-     * Is the given service starting or started?
+     * Is the given service starting or already started?
      *
-     * @return <tt>true</tt> if already started, <tt>false</tt> otherwise
+     * @return <tt>true</tt> if starting or already started, <tt>false</tt> 
otherwise
+     * @see StatefulService#isStarting()
+     * @see StatefulService#isStarted()
      */
     public static boolean isStarted(Object value) {
         if (value instanceof StatefulService) {
@@ -426,14 +430,16 @@ public final class ServiceHelper {
     }
     
     /**
-     * Is the given service suspended?
+     * Is the given service suspending or already suspended?
      *
-     * @return <tt>true</tt> if already suspended, <tt>false</tt> otherwise
+     * @return <tt>true</tt> if suspending or already suspended, 
<tt>false</tt> otherwise
+     * @see StatefulService#isSuspending()
+     * @see StatefulService#isSuspended()
      */
     public static boolean isSuspended(Object value) {
         if (value instanceof StatefulService) {
             StatefulService service = (StatefulService) value;
-            if (service.isSuspended() || service.isSuspending()) {
+            if (service.isSuspending() || service.isSuspended()) {
                 return true;
             }
         }

Reply via email to