de.bea.domingo.threadpool
Interface ThreadFactory

All Known Implementing Classes:
DefaultThreadFactory

public interface ThreadFactory

Interface for classes generating threads.

Author:
Kurt Riede

Method Summary
 java.lang.Thread createThread(java.lang.Runnable target)
          Factory method to create Thread objects.
 void handleThrowable(java.lang.Throwable throwable)
          Callback method if an Throwable occurs during starting a thread.
 void initThread()
          Initialize resources of a new thread.
 void termThread()
          Free resources of a new thread.
 

Method Detail

createThread

java.lang.Thread createThread(java.lang.Runnable target)
Factory method to create Thread objects.

The resulting object must not be of class Thread, but can also be of any Class derived from class Thread.

Parameters:
target - the object whose run() method gets called
Returns:
a Thread

initThread

void initThread()
Initialize resources of a new thread.


termThread

void termThread()
Free resources of a new thread.


handleThrowable

void handleThrowable(java.lang.Throwable throwable)
Callback method if an Throwable occurs during starting a thread.

A component that uses a thread factory (e.g. a thread pool) can call this method to notify the thread factory about problems when creating a thread.

Parameters:
throwable - a throwable that occurred during starting a thread


Domingo Java-API