Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.util
Class ThreadPool.PoolThread  view ThreadPool.PoolThread download ThreadPool.PoolThread.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.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.


Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  int _id
           
(package private)  java.lang.Object _job
           
(package private)  java.lang.String _name
           
(package private)  Pool _pool
           
(package private)  ThreadPool _threadPool
           
 
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()
          Returns a string representation of this thread, including the thread's name, priority, and thread group.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, 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
 

Field Detail

_threadPool

ThreadPool _threadPool

_pool

Pool _pool

_job

java.lang.Object _job

_id

int _id

_name

java.lang.String _name
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

toString

public java.lang.String toString()
Description copied from class: java.lang.Thread
Returns a string representation of this thread, including the thread's name, priority, and thread group.