Package org.apache.camel.support
Class BridgeExceptionHandlerToErrorHandler
- java.lang.Object
-
- org.apache.camel.support.BridgeExceptionHandlerToErrorHandler
-
- All Implemented Interfaces:
org.apache.camel.spi.ExceptionHandler
public class BridgeExceptionHandlerToErrorHandler extends Object implements org.apache.camel.spi.ExceptionHandler
AnExceptionHandlerthat uses theDefaultConsumerto process the caused exception to send the message into the Camel routing engine which allows to let the routing engine handle the exception. An endpoint can be configured with bridgeErrorHandler=true in the URI to enable thisBridgeExceptionHandlerToErrorHandleron the consumer. The consumer must extend theDefaultConsumer, to support this, if not anIllegalArgumentExceptionis thrown upon startup. Notice: When using this bridging error handler, then interceptors, onCompletions does not apply. TheExchangeis processed directly by the Camel error handler, and does not allow prior actions such as interceptors, onCompletion to take action.
-
-
Constructor Summary
Constructors Constructor Description BridgeExceptionHandlerToErrorHandler(DefaultConsumer consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleException(String message, Throwable exception)voidhandleException(String message, org.apache.camel.Exchange exchange, Throwable exception)voidhandleException(Throwable exception)
-
-
-
Constructor Detail
-
BridgeExceptionHandlerToErrorHandler
public BridgeExceptionHandlerToErrorHandler(DefaultConsumer consumer)
-
-
Method Detail
-
handleException
public void handleException(Throwable exception)
- Specified by:
handleExceptionin interfaceorg.apache.camel.spi.ExceptionHandler
-
handleException
public void handleException(String message, Throwable exception)
- Specified by:
handleExceptionin interfaceorg.apache.camel.spi.ExceptionHandler
-
-