public class ErrorHandlerBuilderRef extends ErrorHandlerBuilderSupport
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ERROR_HANDLER_BUILDER |
Constructor and Description |
---|
ErrorHandlerBuilderRef(String ref) |
Modifier and Type | Method and Description |
---|---|
void |
addErrorHandlers(RouteContext routeContext,
OnExceptionDefinition exception)
Adds error handler for the given exception type
|
ErrorHandlerBuilder |
cloneBuilder()
Clones this builder so each
RouteBuilder has its private builder
to use, to avoid changes from one RouteBuilder to influence the
others. |
protected void |
cloneBuilder(ErrorHandlerBuilderRef other) |
Processor |
createErrorHandler(RouteContext routeContext,
Processor processor)
Creates the error handler
|
String |
getRef() |
static boolean |
isErrorHandlerBuilderConfigured(String ref)
Returns whether a specific error handler builder has been configured or not.
|
protected static ErrorHandlerFactory |
lookupErrorHandlerBuilder(ModelCamelContext camelContext) |
static ErrorHandlerFactory |
lookupErrorHandlerBuilder(RouteContext routeContext,
String ref)
Lookup the error handler by the given ref
|
static ErrorHandlerFactory |
lookupErrorHandlerBuilder(RouteContext routeContext,
String ref,
boolean mandatory)
Lookup the error handler by the given ref
|
boolean |
removeOnExceptionList(String id)
Remove the OnExceptionList by look up the route id from the ErrorHandlerBuilder internal map
|
boolean |
supportTransacted()
Whether this error handler supports transacted exchanges.
|
String |
toString() |
cloneBuilder, configure, exceptionPolicyStrategy, getErrorHandlers, getExceptionPolicyStrategy, getRouteId, setErrorHandlers, setExceptionPolicyStrategy
public static final String DEFAULT_ERROR_HANDLER_BUILDER
public ErrorHandlerBuilderRef(String ref)
public void addErrorHandlers(RouteContext routeContext, OnExceptionDefinition exception)
ErrorHandlerBuilder
addErrorHandlers
in interface ErrorHandlerBuilder
addErrorHandlers
in class ErrorHandlerBuilderSupport
routeContext
- the route contextexception
- the exception to handlepublic boolean removeOnExceptionList(String id)
ErrorHandlerBuilderSupport
removeOnExceptionList
in class ErrorHandlerBuilderSupport
id
- the route idpublic Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception
ErrorHandlerFactory
routeContext
- the route contextprocessor
- the outer processorException
- is thrown if the error handler could not be createdpublic boolean supportTransacted()
ErrorHandlerBuilder
public ErrorHandlerBuilder cloneBuilder()
ErrorHandlerBuilder
RouteBuilder
has its private builder
to use, to avoid changes from one RouteBuilder
to influence the
others.
This is needed by the current Camel 2.x architecture.ErrorHandlerBuilder
protected void cloneBuilder(ErrorHandlerBuilderRef other)
public static ErrorHandlerFactory lookupErrorHandlerBuilder(RouteContext routeContext, String ref)
routeContext
- the route contextref
- reference id for the error handlerpublic static ErrorHandlerFactory lookupErrorHandlerBuilder(RouteContext routeContext, String ref, boolean mandatory)
routeContext
- the route contextref
- reference id for the error handlermandatory
- whether the error handler must exists, if not a NoSuchBeanException
is thrownprotected static ErrorHandlerFactory lookupErrorHandlerBuilder(ModelCamelContext camelContext)
public static boolean isErrorHandlerBuilderConfigured(String ref)
Apache Camel