org.apache.camel.processor.interceptor
Class HandleFault
java.lang.Object
org.apache.camel.processor.interceptor.HandleFault
- All Implemented Interfaces:
- InterceptStrategy
public final class HandleFault
- extends Object
- implements InterceptStrategy
InterceptStrategy implementation to handle faults as exceptions on a RouteContext
HandleFault
public HandleFault()
wrapProcessorInInterceptors
public Processor wrapProcessorInInterceptors(ProcessorDefinition processorDefinition,
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.
- Specified by:
wrapProcessorInInterceptors in interface InterceptStrategy
- Parameters:
processorDefinition - the object that invokes this methodtarget - the processor to be wrappednextTarget - the next processor to be routed to
- Returns:
- processor wrapped with an interceptor or not wrapped
- Throws:
Exception - can be thrown
getHandleFault
public static HandleFault getHandleFault(CamelContext context)
- A helper method to return the HandleFault instance
for a given
CamelContext if one is enabled
- Parameters:
context - the camel context the handlefault intercept strategy is connected to
- Returns:
- the stream cache or null if none can be found
toString
public String toString()
- Overrides:
toString in class Object
Apache CAMEL