Updated Branches:
  refs/heads/master d53afc47c -> 56c522e24

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/56c522e2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/56c522e2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/56c522e2

Branch: refs/heads/master
Commit: 56c522e2489e74539c2b712239509642477820fc
Parents: d53afc4
Author: Babak Vahdat <[email protected]>
Authored: Sun Nov 10 21:15:11 2013 +0100
Committer: Babak Vahdat <[email protected]>
Committed: Sun Nov 10 21:15:11 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/56c522e2/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 9709723..7e261d6 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