org.mule.exception
Class TemplateMessagingExceptionStrategy

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
      extended by org.mule.processor.AbstractMessageProcessorOwner
          extended by org.mule.exception.AbstractExceptionListener
              extended by org.mule.exception.TemplateMessagingExceptionStrategy
All Implemented Interfaces:
Acceptor, AnnotatedObject, FlowConstructAware, MuleContextAware, ExceptionHandler, MessagingExceptionHandler, MessagingExceptionHandlerAcceptor, Disposable, Initialisable, Lifecycle, Startable, Stoppable
Direct Known Subclasses:
CatchMessagingExceptionStrategy, RollbackMessagingExceptionStrategy

public abstract class TemplateMessagingExceptionStrategy
extends AbstractExceptionListener
implements MessagingExceptionHandlerAcceptor


Field Summary
 
Fields inherited from class org.mule.exception.AbstractExceptionListener
commitTxFilter, enableNotifications, initialised, logger, messageProcessors, rollbackTxFilter
 
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
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
TemplateMessagingExceptionStrategy()
           
 
Method Summary
 boolean accept(MuleEvent event)
           
 boolean acceptsAll()
           
protected  MuleEvent afterRouting(Exception exception, MuleEvent event)
           
protected  MuleEvent beforeRouting(Exception exception, MuleEvent event)
           
protected  void doInitialise(MuleContext muleContext)
           
 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).
protected  void markExceptionAsHandled(Exception exception)
           
protected  void nullifyExceptionPayloadIfRequired(MuleEvent event)
           
protected  void processReplyTo(MuleEvent event, Exception e)
           
protected  MuleEvent route(MuleEvent event, Exception t)
           
 void setHandleException(boolean handleException)
           
 void setWhen(String when)
           
 
Methods inherited from class org.mule.exception.AbstractExceptionListener
addEndpoint, closeStream, commit, fireNotification, fireNotification, getCommitTxFilter, getExceptionType, getMessageProcessors, getOwnedMessageProcessors, getRollbackTxFilter, handleTransaction, initialise, isEnableNotifications, isInitialised, isRollback, logException, logFatal, removeMessageProcessor, rollback, rollback, rollbackTransaction, routeException, routeException, setCommitTxFilter, setEnableNotifications, setMessageProcessors, setRollbackTxFilter
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
 
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.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.api.construct.FlowConstructAware
setFlowConstruct
 

Constructor Detail

TemplateMessagingExceptionStrategy

public TemplateMessagingExceptionStrategy()
Method Detail

handleException

public final 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

markExceptionAsHandled

protected void markExceptionAsHandled(Exception exception)

processReplyTo

protected void processReplyTo(MuleEvent event,
                              Exception e)

nullifyExceptionPayloadIfRequired

protected void nullifyExceptionPayloadIfRequired(MuleEvent event)

route

protected MuleEvent route(MuleEvent event,
                          Exception t)

doInitialise

protected void doInitialise(MuleContext muleContext)
                     throws InitialisationException
Overrides:
doInitialise in class AbstractExceptionListener
Throws:
InitialisationException

setWhen

public void setWhen(String when)

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.

afterRouting

protected MuleEvent afterRouting(Exception exception,
                                 MuleEvent event)

beforeRouting

protected MuleEvent beforeRouting(Exception exception,
                                  MuleEvent event)

setHandleException

public void setHandleException(boolean handleException)


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