public class InstrumentationInterceptStrategy extends Object implements InterceptStrategy
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.Constructor and Description |
---|
InstrumentationInterceptStrategy(Map<ProcessorDefinition<?>,PerformanceCounter> registeredCounters,
Map<Processor,KeyValueHolder<ProcessorDefinition<?>,InstrumentationProcessor>> wrappedProcessors) |
Modifier and Type | Method and Description |
---|---|
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. |
public InstrumentationInterceptStrategy(Map<ProcessorDefinition<?>,PerformanceCounter> registeredCounters, Map<Processor,KeyValueHolder<ProcessorDefinition<?>,InstrumentationProcessor>> wrappedProcessors)
public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition, Processor target, Processor nextTarget) throws Exception
InterceptStrategy
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.wrapProcessorInInterceptors
in interface InterceptStrategy
context
- Camel contextdefinition
- the model this interceptor representstarget
- the processor to be wrappednextTarget
- the next processor to be routed toException
- can be thrownApache Camel