public class NamedThreadFactory extends Object implements ThreadFactory
ThreadFactory with Custom Name Prefixes| Modifier and Type | Field and Description |
|---|---|
private Integer |
threadCounter |
private String |
threadPrefix |
| Constructor and Description |
|---|
NamedThreadFactory(String threadPrefix) |
private final String threadPrefix
private Integer threadCounter
public NamedThreadFactory(String threadPrefix) throws IllegalArgumentException
IllegalArgumentException - If the thread prefix is null or emptypublic Thread newThread(Runnable r)
newThread in interface ThreadFactoryCopyright © 2017. All rights reserved.