Package org.apache.camel.main
Class DefaultMainShutdownStrategy
java.lang.Object
org.apache.camel.main.SimpleMainShutdownStrategy
org.apache.camel.main.DefaultMainShutdownStrategy
- All Implemented Interfaces:
MainShutdownStrategy
Implementation of
MainShutdownStrategy that add a virtual machine shutdown hook to properly stop the main
instance.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.camel.main.MainShutdownStrategy
MainShutdownStrategy.ShutdownEventListener -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.camel.main.SimpleMainShutdownStrategy
addShutdownListener, getExtraShutdownTimeout, isRunAllowed, restartAwait, setExtraShutdownTimeout, shutdown
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
DefaultMainShutdownStrategy
-
-
Method Details
-
disableHangupSupport
public void disableHangupSupport()Disable the hangup support. No graceful stop by calling stop() on a Hangup signal. -
enableHangupSupport
public void enableHangupSupport()Hangup support is enabled by default. -
init
public void init()Description copied from interface:MainShutdownStrategyInitializes this strategy.- Specified by:
initin interfaceMainShutdownStrategy- Overrides:
initin classSimpleMainShutdownStrategy
-
await
Description copied from interface:MainShutdownStrategyWaiting for Camel Main to complete.- Specified by:
awaitin interfaceMainShutdownStrategy- Overrides:
awaitin classSimpleMainShutdownStrategy- Throws:
InterruptedException
-
await
Description copied from interface:MainShutdownStrategyWaiting for Camel Main to complete (with timeout).- Specified by:
awaitin interfaceMainShutdownStrategy- Overrides:
awaitin classSimpleMainShutdownStrategy- Parameters:
timeout- the maximum time to waitunit- the time unit of thetimeoutargument- Returns:
- true if Camel Main was completed before the timeout, false if timeout was triggered.
- Throws:
InterruptedException
-