public class SimpleMainShutdownStrategy extends Object implements MainShutdownStrategy
MainShutdownStrategy.MainShutdownStrategy.ShutdownEventListener| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
SimpleMainShutdownStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownListener(MainShutdownStrategy.ShutdownEventListener listener)
Adds a shutdown listener
|
void |
await()
Waiting for Camel Main to complete.
|
boolean |
await(long timeout,
TimeUnit unit)
Waiting for Camel Main to complete (with timeout).
|
boolean |
isRunAllowed()
Returns true if the application is allowed to run.
|
void |
restartAwait()
This is used for restarting await with timeout.
|
boolean |
shutdown()
Return true if the shutdown has been initiated by the caller.
|
public boolean isRunAllowed()
MainShutdownStrategyisRunAllowed in interface MainShutdownStrategypublic void addShutdownListener(MainShutdownStrategy.ShutdownEventListener listener)
MainShutdownStrategyaddShutdownListener in interface MainShutdownStrategylistener - the listenerpublic boolean shutdown()
MainShutdownStrategyshutdown in interface MainShutdownStrategypublic void await()
throws InterruptedException
MainShutdownStrategyawait in interface MainShutdownStrategyInterruptedExceptionpublic boolean await(long timeout,
TimeUnit unit)
throws InterruptedException
MainShutdownStrategyawait in interface MainShutdownStrategytimeout - the maximum time to waitunit - the time unit of the timeout argumentInterruptedExceptionpublic void restartAwait()
MainShutdownStrategyrestartAwait in interface MainShutdownStrategyApache Camel