org.apache.camel.management
Class InstrumentationInterceptStrategy

java.lang.Object
  extended by org.apache.camel.management.InstrumentationInterceptStrategy
All Implemented Interfaces:
InterceptStrategy

public class InstrumentationInterceptStrategy
extends Object
implements InterceptStrategy

This strategy class wraps targeted processors with a InstrumentationProcessor. Each InstrumentationProcessor has an embedded ManagedPerformanceCounter for monitoring performance metrics.

This class looks up a map to determine which PerformanceCounter should go into the InstrumentationProcessor for any particular target processor.

Version:

Constructor Summary
InstrumentationInterceptStrategy(Map<ProcessorDefinition,PerformanceCounter> registeredCounters, Map<Processor,KeyValueHolder<ProcessorDefinition,InstrumentationProcessor>> wrappedProcessors)
           
 
Method Summary
 String toString()
           
 Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition definition, Processor target, Processor nextTarget)
          This method is invoked by ProcessorDefinition.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstrumentationInterceptStrategy

public InstrumentationInterceptStrategy(Map<ProcessorDefinition,PerformanceCounter> registeredCounters,
                                        Map<Processor,KeyValueHolder<ProcessorDefinition,InstrumentationProcessor>> wrappedProcessors)
Method Detail

wrapProcessorInInterceptors

public Processor wrapProcessorInInterceptors(CamelContext context,
                                             ProcessorDefinition definition,
                                             Processor target,
                                             Processor nextTarget)
                                      throws Exception
Description copied from interface: InterceptStrategy
This method is invoked by ProcessorDefinition.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.

Important: See the class javadoc for advice on letting interceptor be compatible with the asynchronous routing engine.

Specified by:
wrapProcessorInInterceptors in interface InterceptStrategy
Parameters:
context - Camel context
definition - the model this interceptor represents
target - the processor to be wrapped
nextTarget - the next processor to be routed to
Returns:
processor wrapped with an interceptor or not wrapped.
Throws:
Exception - can be thrown

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL