org.apache.tomcat.util.threads

Interface ThreadPoolRunnable

Known Implementing Classes:
Expirer

public interface ThreadPoolRunnable

Implemented if you want to run a piece of code inside a thread pool.

Method Summary

Object[]
getInitData()
Called when this object is first loaded in the thread pool.
void
runIt(thData[] )
This method will be executed in one of the pool's threads.

Method Details

getInitData

public Object[] getInitData()
Called when this object is first loaded in the thread pool. Important: all workers in a pool must be of the same type, otherwise the mechanism becomes more complex.


runIt

public void runIt(thData[] )
This method will be executed in one of the pool's threads. The thread will be returned to the pool.


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.