org.mule.impl
Class DefaultComponentExceptionStrategy

java.lang.Object
  extended byorg.mule.impl.AbstractExceptionListener
      extended byorg.mule.impl.DefaultExceptionStrategy
          extended byorg.mule.impl.DefaultComponentExceptionStrategy
All Implemented Interfaces:
java.beans.ExceptionListener, Initialisable

public class DefaultComponentExceptionStrategy
extends DefaultExceptionStrategy

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

Version:
$Revision: 1.5 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Fields inherited from class org.mule.impl.AbstractExceptionListener
endpoints
 
Constructor Summary
DefaultComponentExceptionStrategy()
           
DefaultComponentExceptionStrategy(UMOComponent component)
          Constructor
 
Method Summary
 void defaultHandler(java.lang.Throwable t)
           
 UMOComponent getComponent()
           
protected  void logFatal(UMOMessage message, java.lang.Throwable t)
          Logs a fatal error message to the logging system.
protected  void routeException(UMOMessage message, UMOEndpoint failedEndpoint, java.lang.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 UMOMassage available to dispatch.
 void setComponent(UMOComponent component)
           
 
Methods inherited from class org.mule.impl.DefaultExceptionStrategy
handleLifecycleException, handleMessagingException, handleRoutingException, handleStandardException
 
Methods inherited from class org.mule.impl.AbstractExceptionListener
addEndpoint, exceptionThrown, getEndpoint, getEndpoints, getErrorMessagePayload, getExceptionType, initialise, logException, markTransactionForRollback, removeEndpoint, setEndpoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static transient Log logger
logger used by this class

Constructor Detail

DefaultComponentExceptionStrategy

public DefaultComponentExceptionStrategy()

DefaultComponentExceptionStrategy

public DefaultComponentExceptionStrategy(UMOComponent component)
Constructor

Parameters:
component - the owner of this exception strategy
See Also:
DefaultLifecycleAdapter
Method Detail

getComponent

public UMOComponent getComponent()
Returns:
the UniversalMessageObject to which this handler is attached

defaultHandler

public void defaultHandler(java.lang.Throwable t)
Overrides:
defaultHandler in class DefaultExceptionStrategy

logFatal

protected void logFatal(UMOMessage message,
                        java.lang.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
Parameters:
message - The UMOMessage currently being processed
t - the fatal exception to log

routeException

protected void routeException(UMOMessage message,
                              UMOEndpoint failedEndpoint,
                              java.lang.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 UMOMassage available to dispatch. The message dispatched from this method will be an ExceptionMessage which contains the exception thrown the UMOMessage and any context information.

Overrides:
routeException in class AbstractExceptionListener
Parameters:
message - the UMOMessage being processed when the exception occurred
failedEndpoint - optional; the endpoint being dispatched or recieved 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

setComponent

public void setComponent(UMOComponent component)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.