org.jdtaus.core.lang
Class ExceptionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jdtaus.core.lang.ExceptionEvent
All Implemented Interfaces:
Serializable

public class ExceptionEvent
extends EventObject

Event holding an exception.

Version:
$Id: ExceptionEvent.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte
See Also:
ExceptionEventSource, Serialized Form

Constructor Summary
ExceptionEvent(Object source, Thread thread, Throwable throwable)
          Creates a new ExceptionEvent instance taking an exception and a corresponding thread.
 
Method Summary
 Throwable getException()
          Getter for property exception.
 Throwable getRootCause()
          Gets the root cause of the event's exception by traversing up the chained exception hierarchy.
 Thread getThread()
          Getter for property thread.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionEvent

public ExceptionEvent(Object source,
                      Thread thread,
                      Throwable throwable)
Creates a new ExceptionEvent instance taking an exception and a corresponding thread.

Parameters:
source - the source of the new event.
thread - the thread throwable occured in.
throwable - the exception which occured in thread.
Throws:
NullPointerException - if either thread or throwable is null.
Method Detail

getException

public Throwable getException()
Getter for property exception.

Returns:
the exception of the event.

getRootCause

public final Throwable getRootCause()
Gets the root cause of the event's exception by traversing up the chained exception hierarchy.

Returns:
the root cause of the event's exception.

getThread

public Thread getThread()
Getter for property thread.

Returns:
the thread of the event or null.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class EventObject
Returns:
a string representation of the object.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.