org.apache.camel.processor.interceptor
Class StreamCaching

java.lang.Object
  extended by org.apache.camel.processor.interceptor.StreamCaching
All Implemented Interfaces:
InterceptStrategy

public final class StreamCaching
extends Object
implements InterceptStrategy

InterceptStrategy implementation to configure stream caching on a RouteContext


Constructor Summary
StreamCaching()
           
 
Method Summary
static StreamCaching getStreamCaching(CamelContext context)
          A helper method to return the StreamCaching instance for a given CamelContext if one is enabled
static StreamCaching getStreamCaching(List<InterceptStrategy> interceptors)
          A helper method to return the StreamCaching instance for a given list of interceptors
static void noStreamCaching(List<InterceptStrategy> interceptors)
          Remove the StreamCachingInterceptor from the given list of interceptors
 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

StreamCaching

public StreamCaching()
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

getStreamCaching

public static StreamCaching getStreamCaching(CamelContext context)
A helper method to return the StreamCaching instance for a given CamelContext if one is enabled

Parameters:
context - the camel context the stream cache is connected to
Returns:
the stream cache or null if none can be found

getStreamCaching

public static StreamCaching getStreamCaching(List<InterceptStrategy> interceptors)
A helper method to return the StreamCaching instance for a given list of interceptors

Parameters:
interceptors - the list of interceptors
Returns:
the stream cache or null if none can be found

noStreamCaching

public static void noStreamCaching(List<InterceptStrategy> interceptors)
Remove the StreamCachingInterceptor from the given list of interceptors

Parameters:
interceptors - the list of interceptors

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL