org.apache.camel.builder
Interface ErrorHandlerBuilder

All Known Implementing Classes:
DeadLetterChannelBuilder, DefaultErrorHandlerBuilder, ErrorHandlerBuilderRef, ErrorHandlerBuilderSupport, LoggingErrorHandlerBuilder, NoErrorHandlerBuilder

public interface ErrorHandlerBuilder

A builder of a Error Handler

Version:
$Revision: 765920 $

Method Summary
 void addErrorHandlers(OnExceptionDefinition exception)
          Adds error handler for the given exception type
 void configure(ErrorHandler handler)
          Configures the other error handler based on this error handler.
 Processor createErrorHandler(RouteContext routeContext, Processor processor)
          Creates the error handler interceptor
 List<OnExceptionDefinition> getErrorHandlers()
          Gets the error handlers
 ExceptionPolicyStrategy getExceptionPolicyStrategy()
          Gets the exception policy strategy
 void setErrorHandlers(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
 boolean supportTransacted()
          Whether this error handler supports transacted exchanges.
 

Method Detail

createErrorHandler

Processor createErrorHandler(RouteContext routeContext,
                             Processor processor)
                             throws Exception
Creates the error handler interceptor

Parameters:
routeContext - the route context
processor - the outer processor
Returns:
the error handler
Throws:
Exception - is thrown if the error handler could not be created

addErrorHandlers

void addErrorHandlers(OnExceptionDefinition exception)
Adds error handler for the given exception type

Parameters:
exception - the exception to handle

setErrorHandlers

void setErrorHandlers(List<OnExceptionDefinition> exceptions)
Adds the error handlers for the given list of exception types

Parameters:
exceptions - the list of exceptions to handle

getErrorHandlers

List<OnExceptionDefinition> getErrorHandlers()
Gets the error handlers


getExceptionPolicyStrategy

ExceptionPolicyStrategy getExceptionPolicyStrategy()
Gets the exception policy strategy


setExceptionPolicyStrategy

void setExceptionPolicyStrategy(ExceptionPolicyStrategy exceptionPolicyStrategy)
Sets the exception policy strategy to use for resolving the OnExceptionDefinition to use for a given thrown exception

Parameters:
exceptionPolicyStrategy - the exception policy strategy

supportTransacted

boolean supportTransacted()
Whether this error handler supports transacted exchanges.


configure

void configure(ErrorHandler handler)
Configures the other error handler based on this error handler.

Parameters:
handler - the other error handler


Apache CAMEL