org.mule.impl
Class DefaultComponentExceptionStrategy

java.lang.Object
  extended byorg.mule.impl.DefaultExceptionStrategy
      extended byorg.mule.impl.DefaultComponentExceptionStrategy
All Implemented Interfaces:
UMOExceptionStrategy

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.2 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Constructor Summary
DefaultComponentExceptionStrategy()
           
DefaultComponentExceptionStrategy(UMOComponent component)
          Constructor
 
Method Summary
 UMOComponent getComponent()
           
 void handleException(java.lang.Object message, java.lang.Throwable t)
          This is called when an exception occurs.
protected  void routeException(java.lang.Object message, java.lang.Throwable t)
           
 void setComponent(UMOComponent component)
           
 
Methods inherited from class org.mule.impl.DefaultExceptionStrategy
getEndpoint, handleTransaction, setEndpoint
 
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

handleException

public void handleException(java.lang.Object message,
                            java.lang.Throwable t)
This is called when an exception occurs. By implementing this you can provide different stratgies for handling exceptions

Specified by:
handleException in interface UMOExceptionStrategy
Overrides:
handleException in class DefaultExceptionStrategy
Parameters:
message - Can be anthing, but is usually The message being processed when the exception occurred. The message could be an event and implmenting methods should expect that an UMOEvent maybe passed to this method from the framework.
t - The Throwable exception that occurred

routeException

protected void routeException(java.lang.Object message,
                              java.lang.Throwable t)
                       throws UMOException
Overrides:
routeException in class DefaultExceptionStrategy
Throws:
UMOException

setComponent

public void setComponent(UMOComponent component)


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