it.pixel.util.threads
Class ThreadPool.PooledThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--it.pixel.util.threads.ThreadPool.PooledThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ThreadPool

private class ThreadPool.PooledThread
extends java.lang.Thread

This class extends Thread and is the actual Runnable object.


Field Summary
private  ThreadPool pool
          The pool it belongs to
private  RunnableWithParams rwp
          The user defined object to run
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadPool.PooledThread(ThreadPool pool, RunnableWithParams rwp)
           
 
Method Summary
 void run()
          This method loops calling the pool drawParams() method and passing the result to the RunnableWithParams provided in the constructor, until there are no more parameters to process (drawParams() returns null).
 
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

private ThreadPool pool
The pool it belongs to


rwp

private RunnableWithParams rwp
The user defined object to run

Constructor Detail

ThreadPool.PooledThread

public ThreadPool.PooledThread(ThreadPool pool,
                               RunnableWithParams rwp)
Method Detail

run

public void run()
This method loops calling the pool drawParams() method and passing the result to the RunnableWithParams provided in the constructor, until there are no more parameters to process (drawParams() returns null).

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
ThreadPool.drawParams(), RunnableWithParams.run(ThreadPool,Object)