org.apache.camel.builder
Class ErrorHandlerBuilderRef

java.lang.Object
  extended by org.apache.camel.builder.ErrorHandlerBuilderSupport
      extended by org.apache.camel.builder.ErrorHandlerBuilderRef
All Implemented Interfaces:
ErrorHandlerBuilder

public class ErrorHandlerBuilderRef
extends ErrorHandlerBuilderSupport

Represents a proxy to an error handler builder which is resolved by named reference

Version:
$Revision: 768186 $

Field Summary
static String DEFAULT_ERROR_HANDLER_BUILDER
           
 
Constructor Summary
ErrorHandlerBuilderRef(String ref)
           
 
Method Summary
 void addErrorHandlers(OnExceptionDefinition exception)
          Adds error handler for the given exception type
 Processor createErrorHandler(RouteContext routeContext, Processor processor)
          Creates the error handler interceptor
 String getRef()
           
 boolean isErrorHandlerBuilderConfigued()
          Returns whether a specific error handler builder has been configured or not.
 ErrorHandlerBuilder lookupErrorHandlerBuilder(RouteContext routeContext)
           
 boolean supportTransacted()
          Whether this error handler supports transacted exchanges.
 String toString()
           
 
Methods inherited from class org.apache.camel.builder.ErrorHandlerBuilderSupport
configure, exceptionPolicyStrategy, getErrorHandlers, getExceptionPolicyStrategy, setErrorHandlers, setExceptionPolicyStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ERROR_HANDLER_BUILDER

public static final String DEFAULT_ERROR_HANDLER_BUILDER
See Also:
Constant Field Values
Constructor Detail

ErrorHandlerBuilderRef

public ErrorHandlerBuilderRef(String ref)
Method Detail

addErrorHandlers

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

Specified by:
addErrorHandlers in interface ErrorHandlerBuilder
Overrides:
addErrorHandlers in class ErrorHandlerBuilderSupport
Parameters:
exception - the exception to handle

createErrorHandler

public Processor createErrorHandler(RouteContext routeContext,
                                    Processor processor)
                             throws Exception
Description copied from interface: ErrorHandlerBuilder
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

isErrorHandlerBuilderConfigued

public boolean isErrorHandlerBuilderConfigued()
Returns whether a specific error handler builder has been configured or not.

Can be used to test if none has been configured and then install a custom error handler builder replacing the default error handler (that would have been used as fallback otherwise).
This is for instance used by the transacted policy to setup a TransactedErrorHandlerBuilder in camel-spring.


supportTransacted

public boolean supportTransacted()
Description copied from interface: ErrorHandlerBuilder
Whether this error handler supports transacted exchanges.


lookupErrorHandlerBuilder

public ErrorHandlerBuilder lookupErrorHandlerBuilder(RouteContext routeContext)

getRef

public String getRef()

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL