| Modifier and Type | Method and Description |
|---|---|
static Set<Service> |
getChildServices(Service service)
Gathers all child services by navigating the service to recursively gather all child services.
|
static Set<Service> |
getChildServices(Service service,
boolean includeErrorHandler)
Gathers all child services by navigating the service to recursively gather all child services.
|
static void |
initService(Object... services)
Initializes each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
initService(Object value)
Initializes the given
value if it's a Service or a collection of it. |
static boolean |
isStarted(Object value)
Is the given service starting or already started?
|
static boolean |
isStopped(Object value)
Is the given service stopping or already stopped?
|
static boolean |
isSuspended(Object value)
Is the given service suspending or already suspended?
|
static boolean |
resumeService(Object service)
Resumes the given
service. |
static void |
resumeServices(Collection<?> services)
Resumes each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
startService(Object... services)
Starts each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
startService(Object value)
Starts the given
value if it's a Service or a collection of it. |
static void |
stopAndShutdownService(Object value)
Stops and shutdowns the given
service, rethrowing the first exception caught. |
static void |
stopAndShutdownServices(Collection<?> services)
Stops and shutdowns each element of the given
services if services
itself is not null, otherwise this method would return immediately. |
static void |
stopAndShutdownServices(Object... services)
Stops and shutdowns each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
stopService(Collection<?> services)
Stops each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
stopService(Object... services)
Stops each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
static void |
stopService(Object value)
Stops the given
value, rethrowing the first exception caught. |
static boolean |
suspendService(Object service)
Suspends the given
service. |
static void |
suspendServices(Collection<?> services)
Suspends each element of the given
services if services itself is
not null, otherwise this method would return immediately. |
public static void initService(Object value)
value if it's a Service or a collection of it.
Calling this method has no effect if value is null.public static void initService(Object... services)
services if services itself is
not null, otherwise this method would return immediately.initService(Object)public static void startService(Object value)
value if it's a Service or a collection of it.
Calling this method has no effect if value is null.public static void startService(Object... services)
services if services itself is
not null, otherwise this method would return immediately.startService(Object)public static void stopService(Object... services)
services if services itself is
not null, otherwise this method would return immediately.
If there's any exception being thrown while stopping the elements one after the
other this method would rethrow the first such exception being thrown.stopService(Collection)public static void stopService(Object value)
value, rethrowing the first exception caught.
Calling this method has no effect if value is null.Service.stop(),
stopService(Collection)public static void stopService(Collection<?> services)
services if services itself is
not null, otherwise this method would return immediately.
If there's any exception being thrown while stopping the elements one after the
other this method would rethrow the first such exception being thrown.stopService(Object)public static void stopAndShutdownServices(Object... services)
services if services itself is
not null, otherwise this method would return immediately.
If there's any exception being thrown while stopping/shutting down the elements one after
the other this method would rethrow the first such exception being thrown.stopAndShutdownServices(Collection)public static void stopAndShutdownService(Object value)
service, rethrowing the first exception caught.
Calling this method has no effect if value is null.public static void stopAndShutdownServices(Collection<?> services)
services if services
itself is not null, otherwise this method would return immediately.
If there's any exception being thrown while stopping/shutting down the elements one after
the other this method would rethrow the first such exception being thrown.public static void resumeServices(Collection<?> services)
services if services itself is
not null, otherwise this method would return immediately.
If there's any exception being thrown while resuming the elements one after the
other this method would rethrow the first such exception being thrown.resumeService(Object)public static boolean resumeService(Object service)
service.
If service is both Suspendable and SuspendableService then
its SuspendableService.resume() is called but
only if service is already suspended.
If service is not a
Suspendable and SuspendableService then its
Service.start() is called.
Calling this method has no effect if service is null.service - the servicestartService(Object) was called, false
otherwise.Exception - is thrown if error occurredstartService(Object)public static void suspendServices(Collection<?> services)
services if services itself is
not null, otherwise this method would return immediately.
If there's any exception being thrown while suspending the elements one after the
other this method would rethrow the first such exception being thrown.suspendService(Object)public static boolean suspendService(Object service)
service.
If service is both Suspendable and SuspendableService then
its SuspendableService.suspend() is called but
only if service is not already
suspended.
If service is not a
Suspendable and SuspendableService then its
Service.stop() is called.
Calling this method has no effect if service is null.service - the servicestopService(Object) was called, false
otherwise.Exception - is thrown if error occurredstopService(Object)public static boolean isStopped(Object value)
StatefulService.isStopping(),
StatefulService.isStopped()public static boolean isStarted(Object value)
StatefulService.isStarting(),
StatefulService.isStarted()public static boolean isSuspended(Object value)
StatefulService.isSuspending(),
SuspendableService.isSuspended()public static Set<Service> getChildServices(Service service)
service - the servicepublic static Set<Service> getChildServices(Service service, boolean includeErrorHandler)
service - the serviceincludeErrorHandler - whether to include error handlersApache Camel