org.jboss.web
Class ThreadPool

java.lang.Object
  extended byorg.jboss.web.ThreadPool

public class ThreadPool
extends java.lang.Object

A simple thread pool. Rickard Öberg


Constructor Summary
ThreadPool()
          Create a new pool.
 
Method Summary
 void disable()
           
 void enable()
           
 void run(java.lang.Runnable work)
          Do some work.
 void setMaximumSize(int size)
          Set the maximum number of idle threads cached in this pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool()
Create a new pool.

Method Detail

enable

public void enable()

disable

public void disable()

setMaximumSize

public void setMaximumSize(int size)
Set the maximum number of idle threads cached in this pool.


run

public void run(java.lang.Runnable work)
Do some work. This will either create a new thread to do the work, or use an existing idle cached thread.