de.bea.domingo.threadpool
Class DefaultThreadFactory

java.lang.Object
  extended by de.bea.domingo.threadpool.DefaultThreadFactory
All Implemented Interfaces:
ThreadFactory

public final class DefaultThreadFactory
extends java.lang.Object
implements ThreadFactory

Default implementation of the ThreadFactory interface.


Constructor Summary
DefaultThreadFactory(DNotesMonitor theMonitor)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultThreadFactory

public DefaultThreadFactory(DNotesMonitor theMonitor)
Parameters:
theMonitor - ThreadPool monitor Default constructor.
Method Detail

createThread

public 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.

Specified by:
createThread in interface ThreadFactory
Parameters:
target - the object whose run() method gets called
Returns:
a Thread
See Also:
ThreadFactory.createThread(java.lang.Runnable)

initThread

public void initThread()
Initialize resources of a new thread.

Specified by:
initThread in interface ThreadFactory
See Also:
ThreadFactory.initThread()

termThread

public void termThread()
Free resources of a new thread.

Specified by:
termThread in interface ThreadFactory
See Also:
ThreadFactory.termThread()

handleThrowable

public 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.

Specified by:
handleThrowable in interface ThreadFactory
Parameters:
throwable - a throwable that occurred during starting a thread
See Also:
ThreadFactory.handleThrowable(java.lang.Throwable)


Domingo Java-API