net.spy.concurrent
Class WorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.spy.concurrent.WorkerThread
All Implemented Interfaces:
Runnable

public class WorkerThread
extends Thread

Thread that will perform the work for thread pools.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread(Runnable r, String name)
          Construct a named worker thread for the given runnable.
WorkerThread(ThreadGroup tg, Runnable r, String name)
          Construct a named worker thread for the given runnable in the given ThreadGroup.
 
Method Summary
 void setRunning(Runnable to)
          Set the runnable that is being executed, or null if the run is complete.
 String toString()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkerThread

public WorkerThread(ThreadGroup tg,
                    Runnable r,
                    String name)
Construct a named worker thread for the given runnable in the given ThreadGroup.


WorkerThread

public WorkerThread(Runnable r,
                    String name)
Construct a named worker thread for the given runnable.

Method Detail

setRunning

public void setRunning(Runnable to)
Set the runnable that is being executed, or null if the run is complete.


toString

public String toString()
Overrides:
toString in class Thread


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.