public class DefaultThreadFactory extends Object implements ThreadFactory
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PATTERN |
Constructor and Description |
---|
DefaultThreadFactory(ThreadGroup threadGroup,
int initialPriority,
String threadNamePattern,
String node,
String component)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
initialPriority() |
Thread |
newThread(Runnable target) |
void |
setComponent(String component) |
void |
setNode(String node) |
ThreadGroup |
threadGroup() |
String |
threadNamePattern() |
public static final String DEFAULT_PATTERN
public DefaultThreadFactory(ThreadGroup threadGroup, int initialPriority, String threadNamePattern, String node, String component)
threadGroup
- the thread group to assign threads to by default (may be null
)initialPriority
- the initial thread priority, or null
to use the thread group's settingthreadNamePattern
- the name pattern stringpublic void setNode(String node)
public void setComponent(String component)
public String threadNamePattern()
public ThreadGroup threadGroup()
public int initialPriority()
public Thread newThread(Runnable target)
newThread
in interface ThreadFactory
Copyright © 2021 JBoss, a division of Red Hat. All rights reserved.