Forward Computing and Control Pty. Ltd.
Threads Package V1.0.3

2005/04/11
A D E G H I J R S T

A

addListener(Thread, ThreadListener) - Static method in class au.com.forward.threads.ThreadReturn
Adds a listener for a thread.
au.com.forward.threads - package au.com.forward.threads
See the ThreadReturn class for a description of this package.

D

debug - Static variable in class au.com.forward.threads.ThreadReturn
Set this flag to true to output debugging messages to System.out

E

ERROR - Static variable in class au.com.forward.threads.ThreadEvent
This type indicates there was some error in the thread execution or monitoring.

G

getCheckDelay() - Static method in class au.com.forward.threads.ThreadReturn
Gets the loop delay for the check thread that checks on threads waiting to be started.
getObject() - Method in class au.com.forward.threads.ThreadEvent
Gets the Object saved by the thread.
getThread() - Method in class au.com.forward.threads.ThreadEvent
Gets the source Thread of this event.
getThrowable() - Method in class au.com.forward.threads.ThreadEvent
Gets the Throwable object saved by the thread.
getType() - Method in class au.com.forward.threads.ThreadEvent
Gets the type of this ThreadEvent

H

hasDied(Thread) - Static method in class au.com.forward.threads.ThreadReturn
Checks if this thread has died

I

ifInterruptedStop() - Static method in class au.com.forward.threads.ThreadReturn
Calls yield() on the current thread and then throws an InterruptedException if the thread's interrupted state is set.
INTERRUPTED - Static variable in class au.com.forward.threads.ThreadEvent
This type indicates the thread saved either an InterruptedException or a ClosedByInterruptException.

J

join(Thread) - Static method in class au.com.forward.threads.ThreadReturn
Waits for a thread to die and returns the Object it saved.
join(Thread, long) - Static method in class au.com.forward.threads.ThreadReturn
Waits at most milliSecs for a thread to die and returns the Object it saved.
join(Thread, long, int) - Static method in class au.com.forward.threads.ThreadReturn
Waits at most milliSecs+nanoSecs for a thread to die and returns the Object it saved.

R

removeListener(Thread, ThreadListener) - Static method in class au.com.forward.threads.ThreadReturn
Removes a listener from a thread, if the listener has not already been removed.
RETURN - Static variable in class au.com.forward.threads.ThreadEvent
This type indicates the thread died normally.

S

save(Object) - Static method in class au.com.forward.threads.ThreadReturn
Saves this Object against the current thread.
saveImmedeately - Static variable in class au.com.forward.threads.ThreadReturn
Set this flag to true to force listeners to be called as soon as Thread.save() is called for the first time without waiting for the thread to die and the check thread to notice it.
setCheckDelay(long) - Static method in class au.com.forward.threads.ThreadReturn
Sets the loop delay for the check thread that checks on threads waiting to be started.
StackTrace - Class in au.com.forward.threads
The static toString(Throwable t) method of this class is used to retrieve the contents of an exception's stack trace as a String.
stop(Thread) - Static method in class au.com.forward.threads.ThreadReturn
Sets the stop flag for this thread in the threadStopMap and calls the thread's interrupt() method.

T

threadError(ThreadEvent) - Method in interface au.com.forward.threads.ThreadListener
Called when an error occured on the thread or an error occurred in the observer thread.
ThreadEvent - Class in au.com.forward.threads
This class encapsulates a Thread termination event.
ThreadEvent(Thread, Object) - Constructor for class au.com.forward.threads.ThreadEvent
The thread died normally and saved this object for return.
ThreadEvent(Thread, Throwable) - Constructor for class au.com.forward.threads.ThreadEvent
The thread saved some Throwable or some error occurred during the monitoring.
ThreadException - Exception in au.com.forward.threads
An exception of this class, or its sub-class ThreadInterruptedException, is thrown by the ThreadReturn.join() methods when the thread being joined saves a Throwable.
threadInterrupted(ThreadEvent) - Method in interface au.com.forward.threads.ThreadListener
Called when the thread was stopped by being interrupted.
ThreadInterruptedException - Exception in au.com.forward.threads
An exception of this class is thrown by the ThreadReturn.join() methods when the thread being joined throws an InterruptedException or a ClosedByInterruptException.
ThreadListener - Interface in au.com.forward.threads
A listener for thread termination events.
threadResult(ThreadEvent) - Method in interface au.com.forward.threads.ThreadListener
Called when the thread died normally.
ThreadReturn - Class in au.com.forward.threads
This is the main class of this package and contains the static methods for handling threads.
TimedOutException - Exception in au.com.forward.threads
An exception of this class is thrown by the ThreadReturn.join() methods when the join() times out before the thread being joined dies.
TimeOut - Class in au.com.forward.threads
This class sets a timeout time which can by used by mulitple join() statements to specify the total time required for a number of threads to complete.
TimeOut(long) - Constructor for class au.com.forward.threads.TimeOut
Creates a new timeout with an absolute time of now + milliseconds
timeRemaining() - Method in class au.com.forward.threads.TimeOut
Returns the number of milliseconds remaining from now.
toString(Throwable) - Static method in class au.com.forward.threads.StackTrace
Returns the Throwable's stack trace as a String.
toString() - Method in class au.com.forward.threads.ThreadEvent
Returns a string containing a description of this ThreadEvent.

A D E G H I J R S T
Forward Computing and Control Pty. Ltd.
Threads Package V1.0.3

2005/04/11

Copyright ©2002-5, Forward Computing and Control Pty. Ltd
ACN 003 669 994   NSW Australia,   All Rights Reserved.