com.quadrique.jbuildingblocks.core.thread
Class JbbThreadPoolThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.quadrique.jbuildingblocks.core.thread.JbbThreadPoolThread
All Implemented Interfaces:
Runnable

public class JbbThreadPoolThread
extends Thread

This class represents the threads that are executed by the thread pool. They are typically blocked waiting for an object (that implements the Runnable interface) to be posted in the thread pool queue. Once an object is posted to the thread pool queue, one of the thread pool thread instance will be awakened and execute the run() method of that object.


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
JbbThreadPoolThread(JbbThreadPool zThreadPool, int zThreadId, JbbBlockingFifoQueue zQueue)
          constructor
 
Method Summary
 void run()
           
 
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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JbbThreadPoolThread

public JbbThreadPoolThread(JbbThreadPool zThreadPool,
                           int zThreadId,
                           JbbBlockingFifoQueue zQueue)
constructor

Parameters:
zThreadPool - the thread pool that this thread belongs to
zThreadId - the unique identifier of this thread in the pool
zQueue - the blocking FIFO queue that is used to extract the runnable objects
Method Detail

run

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


Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.