org.mule.exception
Class ChoiceMessagingExceptionStrategy
java.lang.Object
org.mule.processor.AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
org.mule.exception.ChoiceMessagingExceptionStrategy
- All Implemented Interfaces:
- Acceptor, FlowConstructAware, MuleContextAware, ExceptionHandler, MessagingExceptionHandler, MessagingExceptionHandlerAcceptor, GlobalNameableObject, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessorContainer
public class ChoiceMessagingExceptionStrategy
- extends AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
- implements MessagingExceptionHandlerAcceptor, MuleContextAware, Lifecycle, MessageProcessorContainer, GlobalNameableObject
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 |
globalName
protected String globalName
ChoiceMessagingExceptionStrategy
public ChoiceMessagingExceptionStrategy()
getGlobalName
public String getGlobalName()
- Specified by:
getGlobalName in interface GlobalNameableObject
setGlobalName
public void setGlobalName(String globalName)
- Specified by:
setGlobalName in interface GlobalNameableObject
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>
addMessageProcessorPathElements
public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
- Description copied from interface:
MessageProcessorContainer
- Add the child nodes to the path element tree.
- Specified by:
addMessageProcessorPathElements in interface MessageProcessorContainer
accept
public boolean accept(MuleEvent event)
- Specified by:
accept in interface Acceptor
- Parameters:
event - MuleEvent to route through exception handler
- Returns:
- true if this
MessagingExceptionHandler should handler exception
false otherwise
acceptsAll
public boolean acceptsAll()
- Specified by:
acceptsAll in interface Acceptor
- Returns:
- true if accepts any message, false otherwise.
Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.