org.mule.exception
Class DefaultServiceExceptionStrategy

java.lang.Object
  extended by org.mule.processor.AbstractMessageProcessorOwner
      extended by org.mule.exception.AbstractExceptionListener
          extended by org.mule.exception.AbstractMessagingExceptionStrategy
              extended by org.mule.exception.DefaultServiceExceptionStrategy
All Implemented Interfaces:
FlowConstructAware, MuleContextAware, MessagingExceptionHandler, Disposable, Initialisable, Lifecycle, Startable, Stoppable
Direct Known Subclasses:
CxfComponentExceptionStrategy

public class DefaultServiceExceptionStrategy
extends AbstractMessagingExceptionStrategy

DefaultServiceExceptionStrategy is the default exception handler for components. The handler logs errors and will forward the message and exception to an exception endpointUri if one is set on this Exception strategy


Field Summary
 
Fields inherited from class org.mule.exception.AbstractExceptionListener
commitTxFilter, enableNotifications, initialised, logger, messageProcessors, rollbackTxFilter
 
Fields inherited from class org.mule.processor.AbstractMessageProcessorOwner
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
DefaultServiceExceptionStrategy()
          Deprecated. Use DefaultServiceExceptionStrategy(MuleContext muleContext) instead
DefaultServiceExceptionStrategy(MuleContext muleContext)
           
 
Method Summary
protected  void doHandleException(Exception e, MuleEvent event)
           
protected  FlowConstructStatistics getFlowConstructStatistics(FlowConstruct flowConstruct)
           
protected  ServiceStatistics getServiceStatistics(FlowConstruct flowConstruct)
           
 boolean isStopMessageProcessing()
           
protected  void logFatal(MuleEvent event, Throwable t)
          Logs a fatal error message to the logging system.
protected  void routeException(MuleEvent event, MessageProcessor target, Throwable t)
          Routes the current exception to an error endpoint such as a Dead Letter Queue (jms) This method is only invoked if there is a MuleMessage available to dispatch.
 void setStopMessageProcessing(boolean stopMessageProcessing)
           
 
Methods inherited from class org.mule.exception.AbstractMessagingExceptionStrategy
commit, defaultHandler, handleException, rollback
 
Methods inherited from class org.mule.exception.AbstractExceptionListener
addEndpoint, closeStream, doInitialise, fireNotification, getCommitTxFilter, getExceptionType, getMessageProcessors, getOwnedMessageProcessors, getRollbackTxFilter, handleTransaction, initialise, isEnableNotifications, isInitialised, isRollback, logException, removeMessageProcessor, rollbackTransaction, setCommitTxFilter, setEnableNotifications, setMessageProcessors, setRollbackTxFilter
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
dispose, 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.exception.MessagingExceptionHandler
getCommitTxFilter, getRollbackTxFilter
 

Constructor Detail

DefaultServiceExceptionStrategy

public DefaultServiceExceptionStrategy()
Deprecated. Use DefaultServiceExceptionStrategy(MuleContext muleContext) instead

For IoC only


DefaultServiceExceptionStrategy

public DefaultServiceExceptionStrategy(MuleContext muleContext)
Method Detail

doHandleException

protected void doHandleException(Exception e,
                                 MuleEvent event)
Overrides:
doHandleException in class AbstractMessagingExceptionStrategy

logFatal

protected void logFatal(MuleEvent event,
                        Throwable t)
Description copied from class: AbstractExceptionListener
Logs a fatal error message to the logging system. This should be used mostly if an error occurs in the exception listener itself. This implementation logs the the message itself to the logs if it is not null

Overrides:
logFatal in class AbstractExceptionListener
t - the fatal exception to log

routeException

protected void routeException(MuleEvent event,
                              MessageProcessor target,
                              Throwable t)
Description copied from class: AbstractExceptionListener
Routes the current exception to an error endpoint such as a Dead Letter Queue (jms) This method is only invoked if there is a MuleMessage available to dispatch. The message dispatched from this method will be an ExceptionMessage which contains the exception thrown the MuleMessage and any context information.

Overrides:
routeException in class AbstractExceptionListener
target - optional; the endpoint being dispatched or received on when the error occurred. This is NOT the endpoint that the message will be disptched on and is only supplied to this method for logging purposes
t - the exception thrown. This will be sent with the ExceptionMessage
See Also:
ExceptionMessage

getFlowConstructStatistics

protected FlowConstructStatistics getFlowConstructStatistics(FlowConstruct flowConstruct)

getServiceStatistics

protected ServiceStatistics getServiceStatistics(FlowConstruct flowConstruct)

isStopMessageProcessing

public boolean isStopMessageProcessing()

setStopMessageProcessing

public void setStopMessageProcessing(boolean stopMessageProcessing)


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