util
Class ResultThread

java.lang.Object
  extended by java.lang.Thread
      extended by util.ResultThread
All Implemented Interfaces:
Runnable

public class ResultThread
extends Thread

A result thread is a thread that can store any single object during its lifetime in the storeResult(java.lang.Object) method. After It has finished, the result can be retrieved with getResult().


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  Object result
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ResultThread()
           
ResultThread(Runnable target)
           
ResultThread(Runnable target, String name)
           
ResultThread(String name)
           
 
Method Summary
 Object getResult()
           
 void storeResult(Object r)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

result

private Object result
Constructor Detail

ResultThread

public ResultThread()

ResultThread

public ResultThread(Runnable target)

ResultThread

public ResultThread(Runnable target,
                    String name)

ResultThread

public ResultThread(String name)
Method Detail

storeResult

public void storeResult(Object r)

getResult

public Object getResult()