org.jasig.portal.utils
Class ThreadPoolWorker

java.lang.Object
  extended by java.lang.Thread
      extended by org.jasig.portal.utils.ThreadPoolWorker
All Implemented Interfaces:
Runnable

public class ThreadPoolWorker
extends Thread

An internal worker thread for the ThreadPool

Author:
Peter Kharchenko pkharchenko@interactivebusiness.com

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  ThreadPoolReceipt currentReceipt
           
protected  boolean shouldQuit
           
protected  boolean shouldRestart
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadPoolWorker(ThreadPool pool)
           
 
Method Summary
 boolean completeRequest()
           
static String getNextWorkerID()
           
 void killRequest()
           
 ThreadPoolReceipt process(Runnable target)
           
 void run()
           
 void stopRequest()
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentReceipt

protected ThreadPoolReceipt currentReceipt

shouldRestart

protected volatile boolean shouldRestart

shouldQuit

protected volatile boolean shouldQuit
Constructor Detail

ThreadPoolWorker

public ThreadPoolWorker(ThreadPool pool)
Method Detail

run

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

getNextWorkerID

public static String getNextWorkerID()

process

public ThreadPoolReceipt process(Runnable target)
                          throws InterruptedException
Throws:
InterruptedException

completeRequest

public boolean completeRequest()

stopRequest

public void stopRequest()

killRequest

public void killRequest()


Copyright © 2010 Jasig. All Rights Reserved.