org.apache.axis2.util.threadpool
Class ThreadPool
java.lang.Object
org.apache.axis2.util.threadpool.ThreadPool
- public class ThreadPool
- extends java.lang.Object
This the thread pool for axis2. This class will be used a singleton
across axis2 engine. ThreadPool
is accepts AxisWorkers
which has
doWork method on them and execute this method, using one of the threads
in the thread pool.
Method Summary |
void |
addWorker(AxisWorker worker)
|
void |
forceShutDown()
A forceful shutdown mechanism for thread pool. |
AxisWorker |
getWorker()
|
void |
safeShutDown()
This is the recommended shutdown method for the thread pool
This will wait till all the workers that are already handed over to the
thread pool get executed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Log log
SLEEP_INTERVAL
protected static long SLEEP_INTERVAL
ThreadPool
public ThreadPool()
addWorker
public void addWorker(AxisWorker worker)
throws AxisFault
- Throws:
AxisFault
getWorker
public AxisWorker getWorker()
safeShutDown
public void safeShutDown()
throws AxisFault
- This is the recommended shutdown method for the thread pool
This will wait till all the workers that are already handed over to the
thread pool get executed.
- Throws:
AxisFault
forceShutDown
public void forceShutDown()
- A forceful shutdown mechanism for thread pool.