public class NamedThreadBuilder extends Object implements ThreadFactory
| Modifier and Type | Field and Description |
|---|---|
private String |
baseName
The base name of created thread.
|
private int |
poolIndex
The number of the pooled thread.
|
private Thread.UncaughtExceptionHandler |
uncaughtExceptionHandler
The uncaught Exception handler.
|
| Constructor and Description |
|---|
NamedThreadBuilder(Thread.UncaughtExceptionHandler uncaughtExceptionHandler,
String baseName)
Default Constructor.
|
private int poolIndex
private final String baseName
private final Thread.UncaughtExceptionHandler uncaughtExceptionHandler
public NamedThreadBuilder(Thread.UncaughtExceptionHandler uncaughtExceptionHandler, String baseName)
uncaughtExceptionHandler - the handler to use for uncaught exceptionbaseName - the base name for all threads created into this poolpublic Thread newThread(Runnable r)
newThread in interface ThreadFactoryCopyright © 2011–2014 JRebirth OSS. All rights reserved.