Package org.apache.camel.main
Interface MainListener
- All Known Implementing Classes:
MainListenerSupport
public interface MainListener
A lifecycle listener to receive callbacks when the Main is started and stopped.
Beware that if you use MainListener then depending on how Camel is started and these main listener is configured then
the beforeInitialize and beforeConfigure events may already have been triggered. So depending on your use-cases then
favour using the later stage events to trigger your code.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback to configure the created CamelContext.voidafterStart(BaseMainSupport main) Callback after the CamelContext has been started.voidafterStop(BaseMainSupport main) Callback after the CamelContext has been stopped.voidCallback invoked after the CamelContext has been created and before the auto-configured step starts.voidCallback invoked after the CamelContext has been created and before the auto-configured step starts.voidbeforeStart(BaseMainSupport main) Callback before the CamelContext is being created and started.voidbeforeStop(BaseMainSupport main) Callback before the CamelContext is being stopped.
-
Method Details
-
beforeInitialize
Callback invoked after the CamelContext has been created and before the auto-configured step starts.- Parameters:
main- the main instance
-
beforeConfigure
Callback invoked after the CamelContext has been created and before the auto-configured step starts.- Parameters:
main- the main instance
-
afterConfigure
Callback to configure the created CamelContext.- Parameters:
main- the main instance
-
beforeStart
Callback before the CamelContext is being created and started.- Parameters:
main- the main instance
-
afterStart
Callback after the CamelContext has been started.- Parameters:
main- the main instance
-
beforeStop
Callback before the CamelContext is being stopped.- Parameters:
main- the main instance
-
afterStop
Callback after the CamelContext has been stopped.- Parameters:
main- the main instance
-