org.huihoo.jfox.pool.thread
Class WorkerThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.huihoo.jfox.pool.thread.WorkerThread
All Implemented Interfaces:
PoolableObject, java.lang.Runnable, org.huihoo.jfox.pool.thread.ThreadPoolableObject

public class WorkerThread
extends java.lang.Thread
implements org.huihoo.jfox.pool.thread.ThreadPoolableObject

Author:
Young Yang

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread()
           
 
Method Summary
 void activate()
          actvite the object before it be retrived
 void destory()
           
 void discard()
          destroy this thread
 void passivate()
          passivate the object before it be restored, set the status to initialized
 void run()
           
 void setTask(org.huihoo.jfox.pool.thread.ThreadTask task)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Constructor Detail

WorkerThread

public WorkerThread()
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

activate

public void activate()
              throws java.lang.Exception
Description copied from interface: PoolableObject
actvite the object before it be retrived
Specified by:
activate in interface PoolableObject

passivate

public void passivate()
               throws java.lang.Exception
Description copied from interface: PoolableObject
passivate the object before it be restored, set the status to initialized
Specified by:
passivate in interface PoolableObject

destory

public void destory()
             throws java.lang.Exception

setTask

public void setTask(org.huihoo.jfox.pool.thread.ThreadTask task)
Specified by:
setTask in interface org.huihoo.jfox.pool.thread.ThreadPoolableObject

discard

public void discard()
Description copied from interface: org.huihoo.jfox.pool.thread.ThreadPoolableObject
destroy this thread
Specified by:
discard in interface org.huihoo.jfox.pool.thread.ThreadPoolableObject