Interface OnCamelContextEvent

All Known Subinterfaces:
OnCamelContextInitialized, OnCamelContextInitializing, OnCamelContextStarted, OnCamelContextStarting, OnCamelContextStopped, OnCamelContextStopping

public interface OnCamelContextEvent
Marker interface for event handlers that react to CamelContext lifecycle phases.

Implementations are placed in the Registry and discovered by Camel during bootstrap, then invoked as the context moves through its lifecycle: initializing, initialized, starting, started, stopping, and stopped. Each phase has its own sub-interface (OnCamelContextInitializing, OnCamelContextInitialized, OnCamelContextStarting, OnCamelContextStarted, OnCamelContextStopping, OnCamelContextStopped) which a handler implements to receive that specific callback; a single class may implement several of them. This is a lightweight, registry-driven alternative to LifecycleStrategy for code that only needs to hook into context startup or shutdown.

See Lifecycle in the Camel user manual.

Since:
3.4
See Also: