org.apache.camel.builder
Class ErrorHandlerBuilderSupport

java.lang.Object
  extended by org.apache.camel.builder.ErrorHandlerBuilderSupport
All Implemented Interfaces:
ErrorHandlerBuilder, ErrorHandlerFactory
Direct Known Subclasses:
DefaultErrorHandlerBuilder, ErrorHandlerBuilderRef, LoggingErrorHandlerBuilder, NoErrorHandlerBuilder

public abstract class ErrorHandlerBuilderSupport
extends Object
implements ErrorHandlerBuilder

Base class for builders of error handling.

Version:

Constructor Summary
ErrorHandlerBuilderSupport()
           
 
Method Summary
 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
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.builder.ErrorHandlerBuilder
cloneBuilder, supportTransacted
 
Methods inherited from interface org.apache.camel.ErrorHandlerFactory
createErrorHandler
 

Constructor Detail

ErrorHandlerBuilderSupport

public ErrorHandlerBuilderSupport()
Method Detail

addErrorHandlers

public void addErrorHandlers(RouteContext routeContext,
                             OnExceptionDefinition exception)
Description copied from interface: ErrorHandlerBuilder
Adds error handler for the given exception type

Specified by:
addErrorHandlers in interface ErrorHandlerBuilder
Parameters:
routeContext - the route context
exception - the exception to handle

cloneBuilder

protected void cloneBuilder(ErrorHandlerBuilderSupport other)

configure

public void configure(RouteContext routeContext,
                      ErrorHandler handler)
Description copied from interface: ErrorHandlerBuilder
Configures the other error handler based on this error handler.

Specified by:
configure in interface ErrorHandlerBuilder
Parameters:
routeContext - the route context
handler - the other error handler

getErrorHandlers

public List<OnExceptionDefinition> getErrorHandlers(RouteContext routeContext)
Description copied from interface: ErrorHandlerBuilder
Gets the error handlers

Specified by:
getErrorHandlers in interface ErrorHandlerBuilder
Parameters:
routeContext - the route context

setErrorHandlers

public void setErrorHandlers(RouteContext routeContext,
                             List<OnExceptionDefinition> exceptions)
Description copied from interface: ErrorHandlerBuilder
Adds the error handlers for the given list of exception types

Specified by:
setErrorHandlers in interface ErrorHandlerBuilder
Parameters:
routeContext - the route context
exceptions - the list of exceptions to handle

exceptionPolicyStrategy

public ErrorHandlerBuilderSupport exceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Sets the exception policy to use


getExceptionPolicyStrategy

public ExceptionPolicyStrategy getExceptionPolicyStrategy()
Description copied from interface: ErrorHandlerBuilder
Gets the exception policy strategy

Specified by:
getExceptionPolicyStrategy in interface ErrorHandlerBuilder

setExceptionPolicyStrategy

public void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Description copied from interface: ErrorHandlerBuilder
Sets the exception policy strategy to use for resolving the OnExceptionDefinition to use for a given thrown exception

Specified by:
setExceptionPolicyStrategy in interface ErrorHandlerBuilder
Parameters:
exceptionPolicyStrategy - the exception policy strategy


Apache Camel