net.sf.jso.util
Class JoinerThread

java.lang.Object
  extended byjava.lang.Thread
      extended bynet.sf.jso.util.JoinerThread
All Implemented Interfaces:
java.lang.Runnable

public final class JoinerThread
extends java.lang.Thread

A thread that informs its joiner that it is done to allow "collective join".


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JoinerThread(ThreadsJoiner aJoiner, java.lang.Runnable aTarget)
          Constructs the joiner thread.
JoinerThread(ThreadsJoiner aJoiner, java.lang.Runnable aTarget, java.lang.String aName)
          Constructs the joiner thread.
 
Method Summary
 ThreadsJoiner getJoiner()
          Returns thread's joiner.
 void run()
          Class Runnable target's run() method is called.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinerThread

public JoinerThread(ThreadsJoiner aJoiner,
                    java.lang.Runnable aTarget)
Constructs the joiner thread.

Parameters:
aJoiner - Joiner to which the thread will collectivelly join.
aTarget - Runnable target to be run.

JoinerThread

public JoinerThread(ThreadsJoiner aJoiner,
                    java.lang.Runnable aTarget,
                    java.lang.String aName)
Constructs the joiner thread.

Parameters:
aJoiner - Joiner to which the thread will collectivelly join.
aTarget - Runnable target to be run.
aName - Thread's name.
Method Detail

getJoiner

public ThreadsJoiner getJoiner()
Returns thread's joiner.

Returns:
Thread's joiner.

run

public void run()
Class Runnable target's run() method is called. Once completed informs joiner that the thread is stopping.