org.apache.camel.spi
Interface InterceptStrategy

All Known Implementing Classes:
Delayer, HandleFault, InstrumentationInterceptStrategy, StreamCaching, Tracer

public interface InterceptStrategy

The purpose of this interface is to allow an implementation to wrap processors in a route with interceptors. For example, a possible usecase is to gather performance statistics at the processor's level.

Version:
$Revision: 770908 $

Method Summary
 Processor wrapProcessorInInterceptors(ProcessorDefinition processorDefinition, 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.
 

Method Detail

wrapProcessorInInterceptors

Processor wrapProcessorInInterceptors(ProcessorDefinition processorDefinition,
                                      Processor target,
                                      Processor nextTarget)
                                      throws Exception
This method is invoked by ProcessorDefinition.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.

Parameters:
processorDefinition - the object that invokes this method
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


Apache CAMEL