com.dvt.app.threadworks
Class CompletionEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.dvt.app.threadworks.CompletionEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class CompletionEvent
- extends java.util.EventObject
Represents a task completion event. A CompletionEvent is optionally given to a
CompletionEventListener upon completion of a task or group of tasks. This feature
is used to notify applications that tasks have been completed.
CompletionEvents allow a listener to understand what task(s) were completed, if
they ran without exception, and what exception was thrown, if applicable.
Copyright: Delta Vortex Technologies, 2001.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Method Summary |
java.lang.Throwable |
getObjectThrown()
Provides exception generated by given task. |
boolean |
isSuccessful()
Indicates if the task (given by the source) ran without exception. |
void |
setObjectThrown(java.lang.Throwable e)
Sets the exception thrown. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CompletionEvent
public CompletionEvent(java.lang.Object source)
CompletionEvent
public CompletionEvent(java.lang.Object source,
java.lang.Throwable exceptionThrown)
isSuccessful
public boolean isSuccessful()
- Indicates if the task (given by the source) ran without exception.
- Returns:
- true if no exception, false otherwise.
getObjectThrown
public java.lang.Throwable getObjectThrown()
- Provides exception generated by given task. This will be null if the
task ran without exception.
setObjectThrown
public void setObjectThrown(java.lang.Throwable e)
- Sets the exception thrown.
Copyright © 2001 Delta Vortex Technologies, Inc. All Rights Reserved.