org.mule.execution
Class ErrorHandlingExecutionTemplate
java.lang.Object
org.mule.execution.ErrorHandlingExecutionTemplate
- All Implemented Interfaces:
- ExecutionTemplate<MuleEvent>
public class ErrorHandlingExecutionTemplate
- extends Object
- implements ExecutionTemplate<MuleEvent>
ExecutionTemplate created by this method should be used on the beginning of the execution of a chain of
MessageProcessor that should manage exceptions.
Should be used when:
An asynchronous MessageProcessor chain is being executed
Because of an element
Because of an asynchronous processing strategy
A Flow is called using a element
Instance of ErrorHandlingExecutionTemplate will:
Route any exception to exception strategy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createErrorHandlingExecutionTemplate
public static ErrorHandlingExecutionTemplate createErrorHandlingExecutionTemplate(MuleContext muleContext,
MessagingExceptionHandler messagingExceptionHandler)
- Creates a ErrorHandlingExecutionTemplate to be used as the main enthat will route any MessagingException thrown to an exception listener
- Parameters:
muleContext
- MuleContext for this applicationmessagingExceptionHandler
- exception listener to execute for any MessagingException exception
execute
public MuleEvent execute(ExecutionCallback<MuleEvent> executionCallback)
throws Exception
- Specified by:
execute
in interface ExecutionTemplate<MuleEvent>
- Throws:
Exception
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.