org.xbill.Task
Class WorkerThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.xbill.Task.WorkerThread

public class WorkerThread
extends Thread

An extension of a Thread that uses threads from a pool, rather than allocating a new thread for each assigned task.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void assignThread(Runnable task, String name)
          Assigns a task to a WorkerThread
 void run()
          Performs the task
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Method Detail

assignThread

public static void assignThread(Runnable task,
                                String name)
Assigns a task to a WorkerThread
Parameters:
task - The task to be run
name - The name of the task

run

public void run()
Performs the task
Overrides:
run in class Thread