public class NamedThread
extends java.lang.Thread
Based on code from the book "Java Concurrency in Practice" by Brian Goetz
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFALT_NAME |
Constructor and Description |
---|
NamedThread(java.lang.Runnable r)
Creates the named thread using a default name.
|
NamedThread(java.lang.Runnable r,
java.lang.String name)
Creates the named thread.
|
Modifier and Type | Method and Description |
---|---|
void |
run() |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final java.lang.String DEFALT_NAME
public NamedThread(java.lang.Runnable r)
r
- public NamedThread(java.lang.Runnable r, java.lang.String name)
r
- name
-