net.sf.xenqtt.test
Class ConfigurableThreadFactory
java.lang.Object
net.sf.xenqtt.test.ConfigurableThreadFactory
- All Implemented Interfaces:
- ThreadFactory
public final class ConfigurableThreadFactory
- extends Object
- implements ThreadFactory
A ThreadFactory
implementation that allows for configurable threads to be produced. Presently the only configuration options are the base name
assigned to the thread (e.g. Worker
) and whether or not the thread is created as a daemon.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurableThreadFactory
public ConfigurableThreadFactory(String baseName,
boolean daemon)
- Create a new instance of this class.
- Parameters:
baseName
- The base name assigned to each thread. An incrementing ID, starting at 0, is appended to the base name. The format is baseName-id
daemon
- Whether or not each thread should be created as a daemon
newThread
public Thread newThread(Runnable r)
- Specified by:
newThread
in interface ThreadFactory
- See Also:
ThreadFactory.newThread(java.lang.Runnable)
Copyright © 2013. All Rights Reserved.