|
Forward Computing and Control Pty. Ltd. Threads Package V1.0.3 2005/04/11 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadListener
A listener for thread termination events.
The effectiveness of this interface
depends on the use of an outer try/catch
block in the thread's run()
method and the addition of ThreadReturn.save(Object)
statements.
See ThreadReturn
for more details.
Method Summary | |
---|---|
void |
threadError(ThreadEvent e)
Called when an error occured on the thread or an error occurred in the observer thread. |
void |
threadInterrupted(ThreadEvent e)
Called when the thread was stopped by being interrupted. |
void |
threadResult(ThreadEvent e)
Called when the thread died normally. |
Method Detail |
---|
void threadResult(ThreadEvent e)
threadError(ThreadEvent e)
.
NOTE:threadResult(ThreadEvent e)
should not modify the
result Object
contained in the ThreadEvent
because the same result Object
will be passed on to the other registered listeners for this thread.
e
- the ThreadEvent
void threadInterrupted(ThreadEvent e)
InterruptedException
or ClosedByInterruptException
. Any exception thrown by this method
will be passed to threadError(ThreadEvent e)
.
NOTE:threadInterrupted(ThreadEvent e)
should not modify the
result Object
contained in the ThreadEvent
because the same result Object
will be passed on to the other registered listeners for this thread.
e
- the ThreadEvent
void threadError(ThreadEvent e)
threadResult(ThreadEvent e)
or threadInterrupted(ThreadEvent e)
or by the thread that is monitoring the thread
being listened to.
All Throwable
objects thrown by this interface method, threadError
,
are caught and ignored. It is your responsibility to catch and handle ALL
Throwable
objects thrown by this method.
e
- the ThreadEvent
|
Forward Computing and Control Pty. Ltd. Threads Package V1.0.3 2005/04/11 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |