de.bea.domingo.threadpool
Interface ThreadPool

All Known Implementing Classes:
SimpleThreadPool

public interface ThreadPool

An interface representing a resizable thread pool which allows asynchronous dispatching of Runnable tasks. It is the responsibility of the Runnable task to handle exceptions gracefully. Any non handled exception will typically just be logged. Though a ThreadPool implementation could have some custom Exception handler

Author:
Kurt Riede

Method Summary
 void invokeLater(java.lang.Runnable task)
          Dispatch a new task onto this pool to be invoked asynchronously later.
 void resize(int newSize)
          Resize the thread pool.
 void stop()
          Stops the pool.
 

Method Detail

invokeLater

void invokeLater(java.lang.Runnable task)
Dispatch a new task onto this pool to be invoked asynchronously later.

Parameters:
task - the task to invoke

stop

void stop()
Stops the pool.


resize

void resize(int newSize)
            throws ThreadPoolException
Resize the thread pool.

Parameters:
newSize - new number of threads in the thread pool
Throws:
ThreadPoolException - if any error occurs during starting threads


Domingo Java-API