org.mortbay.util
Class ThreadPool.PoolThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.mortbay.util.ThreadPool.PoolThread
All Implemented Interfaces:
Pool.PondLife, java.lang.Runnable
Enclosing class:
ThreadPool

public static class ThreadPool.PoolThread
extends java.lang.Thread
implements Pool.PondLife

Pool Thread class. The PoolThread allows the threads job to be retrieved and active status to be indicated.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadPool.PoolThread()
           
 
Method Summary
 void enterPool(Pool pool, int id)
           
 int getID()
           
 void leavePool()
           
 void poolClosing()
           
 void run()
          ThreadPool run.
 void run(ThreadPool pool, java.lang.Object job)
           
 java.lang.String toString()
           
 
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, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPool.PoolThread

public ThreadPool.PoolThread()
Method Detail

enterPool

public void enterPool(Pool pool,
                      int id)
Specified by:
enterPool in interface Pool.PondLife

getID

public int getID()
Specified by:
getID in interface Pool.PondLife

poolClosing

public void poolClosing()
Specified by:
poolClosing in interface Pool.PondLife

leavePool

public void leavePool()
Specified by:
leavePool in interface Pool.PondLife

run

public void run(ThreadPool pool,
                java.lang.Object job)

run

public void run()
ThreadPool run. Loop getting jobs and handling them until idle or stopped.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Thread


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.