public class DaemonThreadFactory extends Object implements ThreadFactory
| Modifier and Type | Field | Description |
|---|---|---|
static DaemonThreadFactory |
INSTANCE |
A reuseable DaemonThreadFactory instance.
|
protected AtomicInteger |
m_cNameSuffix |
The thread name counter.
|
protected String |
m_sNamePrefix |
The prefix to use for unnammed threads produced by the factory.
|
| Constructor | Description |
|---|---|
DaemonThreadFactory() |
Construct a new DameonThreadFacotry.
|
DaemonThreadFactory(String sPrefix) |
Construct a new DameonThreadFacotry.
|
| Modifier and Type | Method | Description |
|---|---|---|
Thread |
makeThread(ThreadGroup group,
Runnable runnable,
String sName) |
Create a Thread with the specified group, runnable, and name.
|
Thread |
newThread(Runnable r) |
protected final String m_sNamePrefix
protected final AtomicInteger m_cNameSuffix
public static final DaemonThreadFactory INSTANCE
public DaemonThreadFactory()
public DaemonThreadFactory(String sPrefix)
sPrefix - the prefix for unnamed threadspublic Thread makeThread(ThreadGroup group, Runnable runnable, String sName)
group - (optional) the thread's thread grouprunnable - (optional) the thread's runnablesName - (optional) the thread's namepublic Thread newThread(Runnable r)
newThread in interface ThreadFactory