org.mule.exception
Class MessagingExceptionStrategyAcceptorDelegate

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessagingExceptionHandler>
      extended by org.mule.exception.MessagingExceptionStrategyAcceptorDelegate
All Implemented Interfaces:
Acceptor, FlowConstructAware, MuleContextAware, ExceptionHandler, MessagingExceptionHandler, MessagingExceptionHandlerAcceptor, Disposable, Initialisable, Lifecycle, Startable, Stoppable

public class MessagingExceptionStrategyAcceptorDelegate
extends AbstractMuleObjectOwner<MessagingExceptionHandler>
implements MessagingExceptionHandlerAcceptor

Allows to use MessagingExceptionHandler as MessagingExceptionHandlerAcceptor.


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
MessagingExceptionStrategyAcceptorDelegate(MessagingExceptionHandler messagingExceptionHandler)
           
 
Method Summary
 boolean accept(MuleEvent event)
           
 boolean acceptsAll()
           
protected  List<MessagingExceptionHandler> 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).
 
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
dispose, getFlowConstruct, getMuleContext, initialise, setFlowConstruct, setMuleContext, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagingExceptionStrategyAcceptorDelegate

public MessagingExceptionStrategyAcceptorDelegate(MessagingExceptionHandler messagingExceptionHandler)
Method Detail

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.

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

getOwnedObjects

protected List<MessagingExceptionHandler> getOwnedObjects()
Specified by:
getOwnedObjects in class AbstractMuleObjectOwner<MessagingExceptionHandler>


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.