org.mule.exception
Class ChoiceMessagingExceptionStrategy
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
org.mule.exception.ChoiceMessagingExceptionStrategy
- All Implemented Interfaces:
- FlowConstructAware, MuleContextAware, ExceptionHandler, MessagingExceptionHandler, Disposable, Initialisable, Lifecycle, Startable, Stoppable
public class ChoiceMessagingExceptionStrategy
- extends AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
- implements MessagingExceptionHandler, MuleContextAware, Lifecycle
Selects which exception strategy to execute based on filtering.
Exception listeners must implement MessagingExceptionHandlerAcceptor
to be part of ChoiceMessagingExceptionStrategy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
ChoiceMessagingExceptionStrategy
public ChoiceMessagingExceptionStrategy()
handleException
public MuleEvent handleException(Exception exception,
MuleEvent event)
- Description copied from interface:
MessagingExceptionHandler
- Take some action when a messaging exception has occurred (i.e., there was a message in play when the exception occurred).
- Specified by:
handleException
in interface MessagingExceptionHandler
- Parameters:
exception
- which occurredevent
- which was being processed when the exception occurred
- Returns:
- new event to route on to the rest of the flow, generally with ExceptionPayload set on the message
setExceptionListeners
public void setExceptionListeners(List<MessagingExceptionHandlerAcceptor> exceptionListeners)
getExceptionListeners
public List<MessagingExceptionHandlerAcceptor> getExceptionListeners()
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
getOwnedObjects
protected List<MessagingExceptionHandlerAcceptor> getOwnedObjects()
- Specified by:
getOwnedObjects
in class AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.