public class JmxManagementLifecycleStrategy extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.LifecycleStrategy, org.apache.camel.CamelContextAware
ManagementStrategy.ManagementStrategy| Constructor and Description |
|---|
JmxManagementLifecycleStrategy() |
JmxManagementLifecycleStrategy(org.apache.camel.CamelContext camelContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
protected void |
manageObject(Object me)
Strategy for managing the object
|
void |
onComponentAdd(String name,
org.apache.camel.Component component) |
void |
onComponentRemove(String name,
org.apache.camel.Component component) |
void |
onContextStart(org.apache.camel.CamelContext context) |
void |
onContextStop(org.apache.camel.CamelContext context) |
void |
onEndpointAdd(org.apache.camel.Endpoint endpoint)
If the endpoint is an instance of ManagedResource then register it with the
mbean server, if it is not then wrap the endpoint in a
ManagedEndpoint and
register that with the mbean server. |
void |
onEndpointRemove(org.apache.camel.Endpoint endpoint) |
void |
onErrorHandlerAdd(org.apache.camel.Route route,
org.apache.camel.Processor errorHandler,
org.apache.camel.ErrorHandlerFactory errorHandlerBuilder) |
void |
onErrorHandlerRemove(org.apache.camel.Route route,
org.apache.camel.Processor errorHandler,
org.apache.camel.ErrorHandlerFactory errorHandlerBuilder) |
void |
onRouteContextCreate(org.apache.camel.Route route) |
void |
onRoutesAdd(Collection<org.apache.camel.Route> routes) |
void |
onRoutesRemove(Collection<org.apache.camel.Route> routes) |
void |
onServiceAdd(org.apache.camel.CamelContext context,
org.apache.camel.Service service,
org.apache.camel.Route route) |
void |
onServiceRemove(org.apache.camel.CamelContext context,
org.apache.camel.Service service,
org.apache.camel.Route route) |
void |
onThreadPoolAdd(org.apache.camel.CamelContext camelContext,
ThreadPoolExecutor threadPool,
String id,
String sourceId,
String routeId,
String threadPoolProfileId) |
void |
onThreadPoolRemove(org.apache.camel.CamelContext camelContext,
ThreadPoolExecutor threadPool) |
protected boolean |
registerProcessor(org.apache.camel.model.ProcessorDefinition<?> processor)
Should the given processor be registered.
|
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
protected boolean |
shouldRegister(Object service,
org.apache.camel.Route route)
Whether or not to register the mbean.
|
protected void |
unmanageObject(Object me)
Un-manages the object.
|
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic JmxManagementLifecycleStrategy()
public JmxManagementLifecycleStrategy(org.apache.camel.CamelContext camelContext)
public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic void onContextStart(org.apache.camel.CamelContext context) throws org.apache.camel.VetoCamelContextStartException
onContextStart in interface org.apache.camel.spi.LifecycleStrategyorg.apache.camel.VetoCamelContextStartExceptionpublic void onContextStop(org.apache.camel.CamelContext context)
onContextStop in interface org.apache.camel.spi.LifecycleStrategypublic void onComponentAdd(String name, org.apache.camel.Component component)
onComponentAdd in interface org.apache.camel.spi.LifecycleStrategypublic void onComponentRemove(String name, org.apache.camel.Component component)
onComponentRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onEndpointAdd(org.apache.camel.Endpoint endpoint)
ManagedEndpoint and
register that with the mbean server.onEndpointAdd in interface org.apache.camel.spi.LifecycleStrategyendpoint - the Endpoint attempted to be addedpublic void onEndpointRemove(org.apache.camel.Endpoint endpoint)
onEndpointRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onServiceAdd(org.apache.camel.CamelContext context, org.apache.camel.Service service, org.apache.camel.Route route)
onServiceAdd in interface org.apache.camel.spi.LifecycleStrategypublic void onServiceRemove(org.apache.camel.CamelContext context, org.apache.camel.Service service, org.apache.camel.Route route)
onServiceRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onRoutesAdd(Collection<org.apache.camel.Route> routes)
onRoutesAdd in interface org.apache.camel.spi.LifecycleStrategypublic void onRoutesRemove(Collection<org.apache.camel.Route> routes)
onRoutesRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onErrorHandlerAdd(org.apache.camel.Route route, org.apache.camel.Processor errorHandler, org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
onErrorHandlerAdd in interface org.apache.camel.spi.LifecycleStrategypublic void onErrorHandlerRemove(org.apache.camel.Route route, org.apache.camel.Processor errorHandler, org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
onErrorHandlerRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onThreadPoolAdd(org.apache.camel.CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId)
onThreadPoolAdd in interface org.apache.camel.spi.LifecycleStrategypublic void onThreadPoolRemove(org.apache.camel.CamelContext camelContext, ThreadPoolExecutor threadPool)
onThreadPoolRemove in interface org.apache.camel.spi.LifecycleStrategypublic void onRouteContextCreate(org.apache.camel.Route route)
onRouteContextCreate in interface org.apache.camel.spi.LifecycleStrategyprotected boolean registerProcessor(org.apache.camel.model.ProcessorDefinition<?> processor)
protected void manageObject(Object me) throws Exception
me - the managed objectException - is thrown if error registering the object for managementprotected void unmanageObject(Object me) throws Exception
me - the managed objectException - is thrown if error unregistering the managed objectprotected boolean shouldRegister(Object service, org.apache.camel.Route route)
ManagementAgent has options which controls when to register.
This allows us to only register mbeans accordingly. For example by default any
dynamic endpoints is not registered. This avoids to register excessive mbeans, which
most often is not desired.service - the object to registerroute - an optional route the mbean is associated with, can be nullprotected void doStart() throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionApache Camel