Package org.apache.camel
Interface StatefulService
-
- All Superinterfaces:
AutoCloseable
,Service
,ShutdownableService
,SuspendableService
- All Known Implementing Classes:
ServiceSupport
,Transformer
,Validator
public interface StatefulService extends SuspendableService, ShutdownableService
AService
which has all the lifecycle events and offers details about its current state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServiceStatus
getStatus()
Returns the current statusboolean
isRunAllowed()
Helper methods so the service knows if it should keep running.boolean
isStarted()
Whether the service is startedboolean
isStarting()
Whether the service is startingboolean
isStopped()
Whether the service is stoppedboolean
isStopping()
Whether the service is stoppingboolean
isSuspending()
Whether the service is suspending-
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
-
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
-
-
-
Method Detail
-
getStatus
ServiceStatus getStatus()
Returns the current status- Returns:
- the current status
-
isStarted
boolean isStarted()
Whether the service is started- Returns:
- true if this service has been started
-
isStarting
boolean isStarting()
Whether the service is starting- Returns:
- true if this service is being started
-
isStopping
boolean isStopping()
Whether the service is stopping- Returns:
- true if this service is in the process of stopping
-
isStopped
boolean isStopped()
Whether the service is stopped- Returns:
- true if this service is stopped
-
isSuspending
boolean isSuspending()
Whether the service is suspending- Returns:
- true if this service is in the process of suspending
-
isRunAllowed
boolean isRunAllowed()
Helper methods so the service knows if it should keep running. Returns false if the service is being stopped or is stopped.- Returns:
- true if the service should continue to run.
-
-