Interface ManagementInterceptStrategy


public interface ManagementInterceptStrategy
SPI that wraps EIP Processors with instrumentation so that per-exchange statistics can be collected and exposed via JMX MBeans.

At route startup, the JMX management lifecycle strategy calls createProcessor(org.apache.camel.NamedNode, org.apache.camel.Processor) for each processor defined in a route. The returned ManagementInterceptStrategy.InstrumentationProcessor delegates to the real processor while invoking ManagementInterceptStrategy.InstrumentationProcessor.before(Exchange) and ManagementInterceptStrategy.InstrumentationProcessor.after(Exchange, T) around each exchange to record timing, exchange counts, and error counts. Those counters are then surfaced through the corresponding managed MBean (for example, a processor MBean registered by ManagementObjectStrategy).

The inner ManagementInterceptStrategy.InstrumentationProcessor interface extends AsyncProcessor and Ordered so that multiple interceptors can be stacked in a defined order without blocking the async dispatch path.

See JMX in the Camel user manual.

See Also: