org.apache.camel.builder
Class ErrorHandlerBuilderRef
java.lang.Object
org.apache.camel.builder.ErrorHandlerBuilderSupport
org.apache.camel.builder.ErrorHandlerBuilderRef
- All Implemented Interfaces:
- ErrorHandlerBuilder
public class ErrorHandlerBuilderRef
- extends ErrorHandlerBuilderSupport
Represents a proxy to an error handler builder which is resolved by named reference
- Version:
- $Revision: 768186 $
DEFAULT_ERROR_HANDLER_BUILDER
public static final String DEFAULT_ERROR_HANDLER_BUILDER
- See Also:
- Constant Field Values
ErrorHandlerBuilderRef
public ErrorHandlerBuilderRef(String ref)
addErrorHandlers
public void addErrorHandlers(OnExceptionDefinition exception)
- Description copied from interface:
ErrorHandlerBuilder
- Adds error handler for the given exception type
- Specified by:
addErrorHandlers
in interface ErrorHandlerBuilder
- Overrides:
addErrorHandlers
in class ErrorHandlerBuilderSupport
- Parameters:
exception
- the exception to handle
createErrorHandler
public Processor createErrorHandler(RouteContext routeContext,
Processor processor)
throws Exception
- Description copied from interface:
ErrorHandlerBuilder
- Creates the error handler interceptor
- Parameters:
routeContext
- the route contextprocessor
- the outer processor
- Returns:
- the error handler
- Throws:
Exception
- is thrown if the error handler could not be created
isErrorHandlerBuilderConfigued
public boolean isErrorHandlerBuilderConfigued()
- Returns whether a specific error handler builder has been configured or not.
Can be used to test if none has been configured and then install a custom error handler builder
replacing the default error handler (that would have been used as fallback otherwise).
This is for instance used by the transacted policy to setup a TransactedErrorHandlerBuilder
in camel-spring.
supportTransacted
public boolean supportTransacted()
- Description copied from interface:
ErrorHandlerBuilder
- Whether this error handler supports transacted exchanges.
lookupErrorHandlerBuilder
public ErrorHandlerBuilder lookupErrorHandlerBuilder(RouteContext routeContext)
getRef
public String getRef()
toString
public String toString()
- Overrides:
toString
in class Object
Apache CAMEL