Updated Branches: refs/heads/camel-2.12.x c6c7ddb3a -> 542de1cb9
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/542de1cb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/542de1cb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/542de1cb Branch: refs/heads/camel-2.12.x Commit: 542de1cb93645455226aff17571741da846cce66 Parents: c6c7ddb 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:18 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/542de1cb/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; } }
