org.apache.camel.builder
Interface ErrorHandlerBuilder

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

public interface ErrorHandlerBuilder
extends ErrorHandlerFactory

A builder of a Error Handler

Version:

Method Summary
 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.
 void configure(RouteContext routeContext, ErrorHandler handler)
          Configures the other error handler based on this error handler.
 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
 boolean supportTransacted()
          Whether this error handler supports transacted exchanges.
 
Methods inherited from interface org.apache.camel.ErrorHandlerFactory
createErrorHandler
 

Method Detail

addErrorHandlers

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

Parameters:
routeContext - the route context
exception - the exception to handle

setErrorHandlers

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

Parameters:
routeContext - the route context
exceptions - the list of exceptions to handle

getErrorHandlers

List<OnExceptionDefinition> getErrorHandlers(RouteContext routeContext)
Gets the error handlers

Parameters:
routeContext - the route context

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(RouteContext routeContext,
               ErrorHandler handler)
Configures the other error handler based on this error handler.

Parameters:
routeContext - the route context
handler - the other error handler

cloneBuilder

ErrorHandlerBuilder cloneBuilder()
Clones this builder so each 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.

Returns:
a clone of this ErrorHandlerBuilder


Apache CAMEL