public interface SuspendableService extends Service
Service
which is also capable of suspending and resuming.
This is useable for services which needs more fine grained control at runtime supporting suspension. Other services
may select to mimic suspending by just stopping the service.
For example this is use by the JmsConsumer which suspends the Spring JMS listener instead of stopping the consumer
totally.
Important: The service should also implement the Suspendable
marker interface to indicate the service
supports suspension using custom code logic.Suspendable
Modifier and Type | Method and Description |
---|---|
boolean |
isSuspended()
Tests whether the service is suspended or not.
|
void |
resume()
Resumes the service.
|
void |
suspend()
Suspends the service.
|
void suspend()
RuntimeCamelException
- is thrown if suspending failedvoid resume()
RuntimeCamelException
- is thrown if resuming failedboolean isSuspended()
Apache Camel