public abstract class ErrorHandlerBuilderSupport extends Object implements ErrorHandlerBuilder
| Constructor and Description |
|---|
ErrorHandlerBuilderSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorHandlers(RouteContext routeContext,
OnExceptionDefinition exception)
Adds error handler for the given exception type
|
protected void |
cloneBuilder(ErrorHandlerBuilderSupport other) |
void |
configure(RouteContext routeContext,
ErrorHandler handler)
Configures the other error handler based on this error handler.
|
ErrorHandlerBuilderSupport |
exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Sets the exception policy to use
|
List<OnExceptionDefinition> |
getErrorHandlers(RouteContext routeContext)
Gets the error handlers
|
ExceptionPolicyStrategy |
getExceptionPolicyStrategy()
Gets the exception policy strategy
|
protected String |
getRouteId(RouteContext routeContext) |
boolean |
removeOnExceptionList(String id)
Remove the OnExceptionList by look up the route id from the ErrorHandlerBuilder internal map
|
void |
setErrorHandlers(RouteContext routeContext,
List<OnExceptionDefinition> exceptions)
Adds the error handlers for the given list of exception types
|
void |
setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Sets the exception policy strategy to use for resolving the
OnExceptionDefinition
to use for a given thrown exception |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloneBuilder, supportTransactedcreateErrorHandlerpublic ErrorHandlerBuilderSupport()
public void addErrorHandlers(RouteContext routeContext, OnExceptionDefinition exception)
ErrorHandlerBuilderaddErrorHandlers in interface ErrorHandlerBuilderrouteContext - the route contextexception - the exception to handleprotected void cloneBuilder(ErrorHandlerBuilderSupport other)
public void configure(RouteContext routeContext, ErrorHandler handler)
ErrorHandlerBuilderconfigure in interface ErrorHandlerBuilderrouteContext - the route contexthandler - the other error handlerpublic List<OnExceptionDefinition> getErrorHandlers(RouteContext routeContext)
ErrorHandlerBuildergetErrorHandlers in interface ErrorHandlerBuilderrouteContext - the route contextpublic void setErrorHandlers(RouteContext routeContext, List<OnExceptionDefinition> exceptions)
ErrorHandlerBuildersetErrorHandlers in interface ErrorHandlerBuilderrouteContext - the route contextexceptions - the list of exceptions to handlepublic ErrorHandlerBuilderSupport exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
public ExceptionPolicyStrategy getExceptionPolicyStrategy()
ErrorHandlerBuildergetExceptionPolicyStrategy in interface ErrorHandlerBuilderpublic void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
ErrorHandlerBuilderOnExceptionDefinition
to use for a given thrown exceptionsetExceptionPolicyStrategy in interface ErrorHandlerBuilderexceptionPolicyStrategy - the exception policy strategypublic boolean removeOnExceptionList(String id)
id - the route idprotected String getRouteId(RouteContext routeContext)
Apache Camel