org.apache.camel.management
Class InstrumentationInterceptStrategy
java.lang.Object
org.apache.camel.management.InstrumentationInterceptStrategy
- All Implemented Interfaces:
- InterceptStrategy
public class InstrumentationInterceptStrategy
- extends java.lang.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:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InstrumentationInterceptStrategy
public InstrumentationInterceptStrategy(java.util.Map<ProcessorDefinition,PerformanceCounter> registeredCounters,
java.util.Map<Processor,KeyValueHolder<ProcessorDefinition,InstrumentationProcessor>> wrappedProcessors)
wrapProcessorInInterceptors
public Processor wrapProcessorInInterceptors(CamelContext context,
ProcessorDefinition definition,
Processor target,
Processor nextTarget)
throws java.lang.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 contextdefinition
- the model this interceptor representstarget
- the processor to be wrappednextTarget
- the next processor to be routed to
- Returns:
- processor wrapped with an interceptor or not wrapped.
- Throws:
java.lang.Exception
- can be thrown
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Apache CAMEL