anvil.java.lang
Class PooledThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--anvil.java.lang.PooledThread
All Implemented Interfaces:
java.lang.Runnable

public class PooledThread
extends java.lang.Thread

class ClientConnection


Field Summary
protected  java.lang.Object _lock
           
protected  ThreadPool _pool
           
protected  boolean _running
           
protected  Task _task
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PooledThread(ThreadPool pool, java.lang.String name)
           
PooledThread(ThreadPool pool, java.lang.String name, Task task)
           
 
Method Summary
 void run()
           
 void shutdown()
           
 void wakeup(Task task)
           
 
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
 

Field Detail

_pool

protected ThreadPool _pool

_task

protected Task _task

_running

protected boolean _running

_lock

protected java.lang.Object _lock
Constructor Detail

PooledThread

public PooledThread(ThreadPool pool,
                    java.lang.String name)

PooledThread

public PooledThread(ThreadPool pool,
                    java.lang.String name,
                    Task task)
Method Detail

wakeup

public void wakeup(Task task)

shutdown

public void shutdown()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread