org.apache.camel.spi
Interface LifecycleStrategy

All Known Implementing Classes:
DefaultManagementLifecycleStrategy, OsgiServiceRegistry

public interface LifecycleStrategy

Strategy for lifecycle notifications.


Method Summary
 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, ErrorHandlerBuilder errorHandlerBuilder)
          Notification on adding 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.
 

Method Detail

onContextStart

void onContextStart(CamelContext context)
                    throws VetoCamelContextStartException
Notification on starting a CamelContext.

Parameters:
context - the camel context
Throws:
VetoCamelContextStartException - can be thrown to veto starting CamelContext. Any other runtime exceptions will be logged at WARN level by Camel will continue starting itself.

onContextStop

void onContextStop(CamelContext context)
Notification on stopping a CamelContext.

Parameters:
context - the camel context

onComponentAdd

void onComponentAdd(String name,
                    Component component)
Notification on adding an Component.

Parameters:
name - the unique name of this component
component - the added component

onComponentRemove

void onComponentRemove(String name,
                       Component component)
Notification on removing an Component.

Parameters:
name - the unique name of this component
component - the removed component

onEndpointAdd

void onEndpointAdd(Endpoint endpoint)
Notification on adding an Endpoint.

Parameters:
endpoint - the added endpoint

onEndpointRemove

void onEndpointRemove(Endpoint endpoint)
Notification on removing an Endpoint.

Parameters:
endpoint - the removed endpoint

onServiceAdd

void onServiceAdd(CamelContext context,
                  Service service,
                  Route route)
Notification on adding a Service.

Parameters:
context - the camel context
service - the added service
route - the route the service belongs to if any possible to determine

onServiceRemove

void onServiceRemove(CamelContext context,
                     Service service,
                     Route route)
Notification on removing a Service.

Parameters:
context - the camel context
service - the removed service
route - the route the service belongs to if any possible to determine

onRoutesAdd

void onRoutesAdd(Collection<Route> routes)
Notification on adding Route(s).

Parameters:
routes - the added routes

onRoutesRemove

void onRoutesRemove(Collection<Route> routes)
Notification on removing Route(s).

Parameters:
routes - the removed routes

onRouteContextCreate

void onRouteContextCreate(RouteContext routeContext)
Notification on adding RouteContext(s).

Parameters:
routeContext - the added route context

onErrorHandlerAdd

void onErrorHandlerAdd(RouteContext routeContext,
                       Processor errorHandler,
                       ErrorHandlerBuilder errorHandlerBuilder)
Notification on adding error handler.

Parameters:
routeContext - the added route context
errorHandler - the error handler
errorHandlerBuilder - the error handler builder

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 context
threadPool - the thread pool
id - 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)


Apache CAMEL