org.globus.wsrf.container
Class ServiceThreadPool

java.lang.Object
  extended byorg.globus.wsrf.container.ServiceThreadPool
Direct Known Subclasses:
GSIServiceThreadPool

public class ServiceThreadPool
extends java.lang.Object

This class is responsible for managing a set of threads. New threads can be added to the pool at any given time.


Field Summary
protected  ServiceDispatcher dispatcher
           
(package private) static org.apache.commons.logging.Log logger
           
private  java.util.Vector serviceThreads
           
 
Constructor Summary
ServiceThreadPool(ServiceDispatcher dispatcher)
           
 
Method Summary
protected  ServiceThread createThread()
           
 int getThreads()
           
private  boolean isDone()
           
 void removeThread(ServiceThread thread)
           
 void startThreads(int threads)
           
 void stopThreads()
           
 void stopThreads(int numThreads)
           
 void waitForThreads()
           
 void waitForThreads(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceThreads

private java.util.Vector serviceThreads

dispatcher

protected ServiceDispatcher dispatcher

logger

static org.apache.commons.logging.Log logger
Constructor Detail

ServiceThreadPool

public ServiceThreadPool(ServiceDispatcher dispatcher)
Method Detail

startThreads

public void startThreads(int threads)

getThreads

public int getThreads()

createThread

protected ServiceThread createThread()

stopThreads

public void stopThreads(int numThreads)

stopThreads

public void stopThreads()

removeThread

public void removeThread(ServiceThread thread)

waitForThreads

public void waitForThreads()
                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitForThreads

public void waitForThreads(int timeout)
                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

isDone

private boolean isDone()