Package org.apache.camel.spi
Interface LifecycleStrategy
- All Known Subinterfaces:
AutowiredLifecycleStrategy
public interface LifecycleStrategy
Strategy for lifecycle notifications.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonComponentAdd(String name, Component component) Notification on adding anComponent.voidonComponentRemove(String name, Component component) Notification on removing anComponent.default voidonContextInitialized(CamelContext context) Notification on initializedCamelContext.default voidonContextInitializing(CamelContext context) Notification on initializing aCamelContext.default voidonContextStarted(CamelContext context) Notification on startedCamelContext.default voidonContextStarting(CamelContext context) Notification on starting aCamelContext.default voidonContextStopped(CamelContext context) Notification on stoppedCamelContext.default voidonContextStopping(CamelContext context) Notification on stopping aCamelContext.default voidonDataFormatCreated(String name, DataFormat dataFormat) Notification onDataFormatbeing resolved from theRegistryvoidonEndpointAdd(Endpoint endpoint) Notification on adding anEndpoint.voidonEndpointRemove(Endpoint endpoint) Notification on removing anEndpoint.default voidonLanguageCreated(String name, Language language) Notification on aLanguageinstance being resolved.voidonRouteContextCreate(Route route) Notification on creatingRoute(s).voidonRoutesAdd(Collection<Route> routes) Notification on addingRoute(s).voidonRoutesRemove(Collection<Route> routes) Notification on removingRoute(s).voidonServiceAdd(CamelContext context, Service service, Route route) Notification on adding aService.voidonServiceRemove(CamelContext context, Service service, Route route) Notification on removing aService.voidonThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId) Notification on adding a thread pool.voidonThreadPoolRemove(CamelContext camelContext, ThreadPoolExecutor threadPool) Notification on removing a thread pool.
-
Method Details
-
onContextInitializing
Notification on initializing aCamelContext.- Parameters:
context- the camel context- Throws:
VetoCamelContextStartException- can be thrown to veto startingCamelContext. Any other runtime exceptions will be logged at WARN level by Camel will continue starting itself.
-
onContextInitialized
Notification on initializedCamelContext.- Parameters:
context- the camel context- Throws:
VetoCamelContextStartException- can be thrown to veto startingCamelContext. Any other runtime exceptions will be logged at WARN level by Camel will continue starting itself.
-
onContextStarting
Notification on starting aCamelContext.- Parameters:
context- the camel context- Throws:
VetoCamelContextStartException- can be thrown to veto startingCamelContext. Any other runtime exceptions will be logged at WARN level by Camel will continue starting itself.
-
onContextStarted
Notification on startedCamelContext.- Parameters:
context- the camel context
-
onContextStopping
Notification on stopping aCamelContext.- Parameters:
context- the camel context
-
onContextStopped
Notification on stoppedCamelContext.- Parameters:
context- the camel context
-
onComponentAdd
Notification on adding anComponent.- Parameters:
name- the unique name of this componentcomponent- the added component
-
onComponentRemove
Notification on removing anComponent.- Parameters:
name- the unique name of this componentcomponent- the removed component
-
onEndpointAdd
Notification on adding anEndpoint.- Parameters:
endpoint- the added endpoint
-
onEndpointRemove
Notification on removing anEndpoint.- Parameters:
endpoint- the removed endpoint
-
onDataFormatCreated
Notification onDataFormatbeing resolved from theRegistry- Parameters:
name- the unique name of theDataFormatdataFormat- the resolvedDataFormat
-
onLanguageCreated
Notification on aLanguageinstance being resolved. -
onServiceAdd
Notification on adding aService.- Parameters:
context- the camel contextservice- the added serviceroute- the route the service belongs to if any possible to determine
-
onServiceRemove
Notification on removing aService.- Parameters:
context- the camel contextservice- the removed serviceroute- the route the service belongs to if any possible to determine
-
onRoutesAdd
Notification on addingRoute(s).- Parameters:
routes- the added routes
-
onRoutesRemove
Notification on removingRoute(s).- Parameters:
routes- the removed routes
-
onRouteContextCreate
Notification on creatingRoute(s).- Parameters:
route- the created route context
-
onThreadPoolAdd
void onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId) Notification on adding a thread pool.- Parameters:
camelContext- the camel contextthreadPool- the thread poolid- id of the thread pool (can be null in special cases)sourceId- id of the source creating the thread pool (can be null in special cases)routeId- id of the route for the source (is null if no source)threadPoolProfileId- id of the thread pool profile, if used for creating this thread pool (can be null)
-
onThreadPoolRemove
Notification on removing a thread pool.- Parameters:
camelContext- the camel contextthreadPool- the thread pool
-