org.mule.exception
Class ChoiceMessagingExceptionStrategy

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessagingExceptionHandlerAcceptor>
      extended by 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


Field Summary
 
Fields inherited from class org.mule.processor.AbstractMuleObjectOwner
flowConstruct, muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
ChoiceMessagingExceptionStrategy()
           
 
Method Summary
 List<MessagingExceptionHandlerAcceptor> getExceptionListeners()
           
protected  List<MessagingExceptionHandlerAcceptor> getOwnedObjects()
           
 MuleEvent handleException(Exception exception, MuleEvent event)
          Take some action when a messaging exception has occurred (i.e., there was a message in play when the exception occurred).
 void initialise()
          Method used to perform any initialisation work.
 void setExceptionListeners(List<MessagingExceptionHandlerAcceptor> exceptionListeners)
           
 
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
dispose, getFlowConstruct, getMuleContext, setFlowConstruct, setMuleContext, start, stop
 
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.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Constructor Detail

ChoiceMessagingExceptionStrategy

public ChoiceMessagingExceptionStrategy()
Method Detail

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 occurred
event - 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.