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, wait
cloneBuilder, supportTransacted
createErrorHandler
public ErrorHandlerBuilderSupport()
public void addErrorHandlers(RouteContext routeContext, OnExceptionDefinition exception)
ErrorHandlerBuilder
addErrorHandlers
in interface ErrorHandlerBuilder
routeContext
- the route contextexception
- the exception to handleprotected void cloneBuilder(ErrorHandlerBuilderSupport other)
public void configure(RouteContext routeContext, ErrorHandler handler)
ErrorHandlerBuilder
configure
in interface ErrorHandlerBuilder
routeContext
- the route contexthandler
- the other error handlerpublic List<OnExceptionDefinition> getErrorHandlers(RouteContext routeContext)
ErrorHandlerBuilder
getErrorHandlers
in interface ErrorHandlerBuilder
routeContext
- the route contextpublic void setErrorHandlers(RouteContext routeContext, List<OnExceptionDefinition> exceptions)
ErrorHandlerBuilder
setErrorHandlers
in interface ErrorHandlerBuilder
routeContext
- the route contextexceptions
- the list of exceptions to handlepublic ErrorHandlerBuilderSupport exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
public ExceptionPolicyStrategy getExceptionPolicyStrategy()
ErrorHandlerBuilder
getExceptionPolicyStrategy
in interface ErrorHandlerBuilder
public void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
ErrorHandlerBuilder
OnExceptionDefinition
to use for a given thrown exceptionsetExceptionPolicyStrategy
in interface ErrorHandlerBuilder
exceptionPolicyStrategy
- the exception policy strategypublic boolean removeOnExceptionList(String id)
id
- the route idprotected String getRouteId(RouteContext routeContext)
Apache Camel