org.apache.camel.management
Class InstrumentationLifecycleStrategy

java.lang.Object
  extended by org.apache.camel.management.InstrumentationLifecycleStrategy
All Implemented Interfaces:
LifecycleStrategy

public class InstrumentationLifecycleStrategy
extends Object
implements LifecycleStrategy

JMX agent that registeres Camel lifecycle events in JMX.

Version:
$Revision: 799257 $

Constructor Summary
InstrumentationLifecycleStrategy()
           
InstrumentationLifecycleStrategy(InstrumentationAgent agent)
           
InstrumentationLifecycleStrategy(InstrumentationAgent agent, CamelContext context)
          Constructor for camel context that has been started.
 
Method Summary
 CamelNamingStrategy getNamingStrategy()
           
 void onContextStart(CamelContext context)
          Notification on starting a CamelContext.
 void onEndpointAdd(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 onRouteContextCreate(RouteContext routeContext)
          Notification on adding RouteContext(s).
 void onRoutesAdd(Collection<Route> routes)
          Notification on adding Route(s).
 void onServiceAdd(CamelContext context, Service service)
          Notification on adding a Service.
protected  boolean registerProcessor(ProcessorDefinition processor)
          Should the given processor be registered.
 void setAgent(InstrumentationAgent agent)
           
 void setNamingStrategy(CamelNamingStrategy strategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentationLifecycleStrategy

public InstrumentationLifecycleStrategy()

InstrumentationLifecycleStrategy

public InstrumentationLifecycleStrategy(InstrumentationAgent agent)

InstrumentationLifecycleStrategy

public InstrumentationLifecycleStrategy(InstrumentationAgent agent,
                                        CamelContext context)
Constructor for camel context that has been started.

Parameters:
agent - the agent
context - the camel context
Method Detail

onContextStart

public void onContextStart(CamelContext context)
Description copied from interface: LifecycleStrategy
Notification on starting a CamelContext.

Specified by:
onContextStart in interface LifecycleStrategy
Parameters:
context - the camel context

onEndpointAdd

public void onEndpointAdd(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.

Specified by:
onEndpointAdd in interface LifecycleStrategy
Parameters:
endpoint - the Endpoint attempted to be added

onRoutesAdd

public void onRoutesAdd(Collection<Route> routes)
Description copied from interface: LifecycleStrategy
Notification on adding Route(s).

Specified by:
onRoutesAdd in interface LifecycleStrategy
Parameters:
routes - the added routes

onServiceAdd

public void onServiceAdd(CamelContext context,
                         Service service)
Description copied from interface: LifecycleStrategy
Notification on adding a Service.

Specified by:
onServiceAdd in interface LifecycleStrategy
Parameters:
context - the camel context
service - the added service

onRouteContextCreate

public void onRouteContextCreate(RouteContext routeContext)
Description copied from interface: LifecycleStrategy
Notification on adding RouteContext(s).

Specified by:
onRouteContextCreate in interface LifecycleStrategy
Parameters:
routeContext - the added route context

registerProcessor

protected boolean registerProcessor(ProcessorDefinition processor)
Should the given processor be registered.


getNamingStrategy

public CamelNamingStrategy getNamingStrategy()

setNamingStrategy

public void setNamingStrategy(CamelNamingStrategy strategy)

setAgent

public void setAgent(InstrumentationAgent agent)


Apache CAMEL