public abstract class LifecycleStrategySupport extends Object implements LifecycleStrategy
LifecycleStrategy implementations.| Constructor and Description |
|---|
LifecycleStrategySupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
onComponentAdd(String name,
Component component)
Notification on adding an
Component. |
void |
onComponentRemove(String name,
Component component)
Notification on removing an
Component. |
void |
onContextStart(CamelContext context)
Notification on starting a
CamelContext. |
void |
onContextStop(CamelContext context)
Notification on stopping a
CamelContext. |
void |
onEndpointAdd(Endpoint endpoint)
Notification on adding an
Endpoint. |
void |
onEndpointRemove(Endpoint endpoint)
Notification on removing an
Endpoint. |
void |
onErrorHandlerAdd(RouteContext routeContext,
Processor errorHandler,
ErrorHandlerFactory errorHandlerBuilder)
Notification on adding error handler.
|
void |
onErrorHandlerRemove(RouteContext routeContext,
Processor errorHandler,
ErrorHandlerFactory errorHandlerBuilder)
Notification on removing error handler.
|
void |
onRouteContextCreate(RouteContext routeContext)
Notification on adding
RouteContext(s). |
void |
onRoutesAdd(Collection<Route> routes)
Notification on adding
Route(s). |
void |
onRoutesRemove(Collection<Route> routes)
Notification on removing
Route(s). |
void |
onServiceAdd(CamelContext context,
Service service,
Route route)
Notification on adding a
Service. |
void |
onServiceRemove(CamelContext context,
Service service,
Route route)
Notification on removing a
Service. |
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.
|
public void onContextStart(CamelContext context) throws VetoCamelContextStartException
LifecycleStrategyCamelContext.onContextStart in interface LifecycleStrategycontext - the camel contextVetoCamelContextStartException - can be thrown to veto starting CamelContext.
Any other runtime exceptions will be logged at WARN level by Camel will continue starting itself.public void onContextStop(CamelContext context)
LifecycleStrategyCamelContext.onContextStop in interface LifecycleStrategycontext - the camel contextpublic void onComponentAdd(String name, Component component)
LifecycleStrategyComponent.onComponentAdd in interface LifecycleStrategyname - the unique name of this componentcomponent - the added componentpublic void onComponentRemove(String name, Component component)
LifecycleStrategyComponent.onComponentRemove in interface LifecycleStrategyname - the unique name of this componentcomponent - the removed componentpublic void onEndpointAdd(Endpoint endpoint)
LifecycleStrategyEndpoint.onEndpointAdd in interface LifecycleStrategyendpoint - the added endpointpublic void onEndpointRemove(Endpoint endpoint)
LifecycleStrategyEndpoint.onEndpointRemove in interface LifecycleStrategyendpoint - the removed endpointpublic void onServiceAdd(CamelContext context, Service service, Route route)
LifecycleStrategyService.onServiceAdd in interface LifecycleStrategycontext - the camel contextservice - the added serviceroute - the route the service belongs to if any possible to determinepublic void onServiceRemove(CamelContext context, Service service, Route route)
LifecycleStrategyService.onServiceRemove in interface LifecycleStrategycontext - the camel contextservice - the removed serviceroute - the route the service belongs to if any possible to determinepublic void onRoutesAdd(Collection<Route> routes)
LifecycleStrategyRoute(s).onRoutesAdd in interface LifecycleStrategyroutes - the added routespublic void onRoutesRemove(Collection<Route> routes)
LifecycleStrategyRoute(s).onRoutesRemove in interface LifecycleStrategyroutes - the removed routespublic void onRouteContextCreate(RouteContext routeContext)
LifecycleStrategyRouteContext(s).onRouteContextCreate in interface LifecycleStrategyrouteContext - the added route contextpublic void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder)
LifecycleStrategyonErrorHandlerAdd in interface LifecycleStrategyrouteContext - the added route contexterrorHandler - the error handlererrorHandlerBuilder - the error handler builderpublic void onErrorHandlerRemove(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder)
LifecycleStrategyonErrorHandlerRemove in interface LifecycleStrategyrouteContext - the removed route contexterrorHandler - the error handlererrorHandlerBuilder - the error handler builderpublic void onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId)
LifecycleStrategyonThreadPoolAdd in interface LifecycleStrategycamelContext - 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)public void onThreadPoolRemove(CamelContext camelContext, ThreadPoolExecutor threadPool)
LifecycleStrategyonThreadPoolRemove in interface LifecycleStrategycamelContext - the camel contextthreadPool - the thread poolApache Camel