Package org.apache.camel
Interface StatefulService
- All Superinterfaces:
AutoCloseable
,Service
,ShutdownableService
,SuspendableService
- All Known Subinterfaces:
BacklogDebugger
- All Known Implementing Classes:
ServiceSupport
,Transformer
,Validator
A
Service
which has all the lifecycle events and offers details about its current state.-
Method Summary
Modifier and TypeMethodDescriptionReturns the current statusboolean
Helper methods so the service knows if it should keep running.boolean
Whether the service is startedboolean
Whether the service is startingboolean
Whether the service is stoppedboolean
Whether the service is stoppingboolean
Whether the service is suspendingMethods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Method Details
-
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.
-