Package org.apache.camel.spi
Interface LifecycleStrategy
-
- All Known Subinterfaces:
AutowiredLifecycleStrategy
public interface LifecycleStrategy
Strategy for lifecycle notifications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
onComponentAdd(String name, Component component)
Notification on adding anComponent
.void
onComponentRemove(String name, Component component)
Notification on removing anComponent
.default void
onContextInitialized(CamelContext context)
Notification on initializedCamelContext
.default void
onContextInitializing(CamelContext context)
Notification on initializing aCamelContext
.default void
onContextStart(CamelContext context)
Deprecated.default void
onContextStarted(CamelContext context)
Notification on startedCamelContext
.default void
onContextStarting(CamelContext context)
Notification on starting aCamelContext
.default void
onContextStop(CamelContext context)
Deprecated.default void
onContextStopped(CamelContext context)
Notification on stoppedCamelContext
.default void
onContextStopping(CamelContext context)
Notification on stopping aCamelContext
.default void
onDataFormatCreated(String name, DataFormat dataFormat)
Notification onDataFormat
being resolved from theRegistry
void
onEndpointAdd(Endpoint endpoint)
Notification on adding anEndpoint
.void
onEndpointRemove(Endpoint endpoint)
Notification on removing anEndpoint
.default void
onLanguageCreated(String name, Language language)
Notification on aLanguage
instance being resolved.void
onRouteContextCreate(Route route)
Notification on creatingRoute
(s).void
onRoutesAdd(Collection<Route> routes)
Notification on addingRoute
(s).void
onRoutesRemove(Collection<Route> routes)
Notification on removingRoute
(s).void
onServiceAdd(CamelContext context, Service service, Route route)
Notification on adding aService
.void
onServiceRemove(CamelContext context, Service service, Route route)
Notification on removing aService
.void
onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId)
Notification on adding a thread pool.void
onThreadPoolRemove(CamelContext camelContext, ThreadPoolExecutor threadPool)
Notification on removing a thread pool.
-
-
-
Method Detail
-
onContextInitializing
default void onContextInitializing(CamelContext context) throws VetoCamelContextStartException
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
default void onContextInitialized(CamelContext context) throws VetoCamelContextStartException
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.
-
onContextStart
@Deprecated default void onContextStart(CamelContext context) throws VetoCamelContextStartException
Deprecated.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. *
-
onContextStarting
default void onContextStarting(CamelContext context) throws VetoCamelContextStartException
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
default void onContextStarted(CamelContext context)
Notification on startedCamelContext
.- Parameters:
context
- the camel context
-
onContextStop
@Deprecated default void onContextStop(CamelContext context)
Deprecated.Notification on stopping aCamelContext
.- Parameters:
context
- the camel context
-
onContextStopping
default void onContextStopping(CamelContext context)
Notification on stopping aCamelContext
.- Parameters:
context
- the camel context
-
onContextStopped
default void onContextStopped(CamelContext context)
Notification on stoppedCamelContext
.- Parameters:
context
- the camel context
-
onComponentAdd
void onComponentAdd(String name, Component component)
Notification on adding anComponent
.- Parameters:
name
- the unique name of this componentcomponent
- the added component
-
onComponentRemove
void onComponentRemove(String name, Component component)
Notification on removing anComponent
.- Parameters:
name
- the unique name of this componentcomponent
- the removed component
-
onEndpointAdd
void onEndpointAdd(Endpoint endpoint)
Notification on adding anEndpoint
.- Parameters:
endpoint
- the added endpoint
-
onEndpointRemove
void onEndpointRemove(Endpoint endpoint)
Notification on removing anEndpoint
.- Parameters:
endpoint
- the removed endpoint
-
onDataFormatCreated
default void onDataFormatCreated(String name, DataFormat dataFormat)
Notification onDataFormat
being resolved from theRegistry
- Parameters:
name
- the unique name of theDataFormat
dataFormat
- the resolvedDataFormat
-
onLanguageCreated
default void onLanguageCreated(String name, Language language)
Notification on aLanguage
instance being resolved.
-
onServiceAdd
void onServiceAdd(CamelContext context, Service service, Route route)
Notification on adding aService
.- Parameters:
context
- the camel contextservice
- the added serviceroute
- the route the service belongs to if any possible to determine
-
onServiceRemove
void onServiceRemove(CamelContext context, Service service, Route route)
Notification on removing aService
.- Parameters:
context
- the camel contextservice
- the removed serviceroute
- the route the service belongs to if any possible to determine
-
onRoutesAdd
void onRoutesAdd(Collection<Route> routes)
Notification on addingRoute
(s).- Parameters:
routes
- the added routes
-
onRoutesRemove
void onRoutesRemove(Collection<Route> routes)
Notification on removingRoute
(s).- Parameters:
routes
- the removed routes
-
onRouteContextCreate
void onRouteContextCreate(Route route)
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
void onThreadPoolRemove(CamelContext camelContext, ThreadPoolExecutor threadPool)
Notification on removing a thread pool.- Parameters:
camelContext
- the camel contextthreadPool
- the thread pool
-
-