public final class DefaultThreadFactory extends Object implements ThreadFactory
ThreadFactory interface.| Constructor and Description |
|---|
DefaultThreadFactory(DNotesMonitor theMonitor) |
| Modifier and Type | Method and Description |
|---|---|
Thread |
createThread(Runnable target)
Factory method to create Thread objects.
|
void |
handleThrowable(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.
|
public DefaultThreadFactory(DNotesMonitor theMonitor)
theMonitor - ThreadPool monitor
Default constructor.public Thread createThread(Runnable target)
The resulting object must not be of class Thread, but can
also be of any Class derived from class Thread.
createThread in interface ThreadFactorytarget - the object whose run() method gets calledThreadFactory.createThread(java.lang.Runnable)public void initThread()
initThread in interface ThreadFactoryThreadFactory.initThread()public void termThread()
termThread in interface ThreadFactoryThreadFactory.termThread()public void handleThrowable(Throwable throwable)
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.
handleThrowable in interface ThreadFactorythrowable - a throwable that occurred during starting a threadThreadFactory.handleThrowable(java.lang.Throwable)Copyright © 2005–2020. All rights reserved.