InterruptSource, Runnablepublic static class InterruptSource.Thread extends Thread implements InterruptSource
InterruptSource.Thread, InterruptSource.UtilThread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor | Description |
|---|---|
Thread() |
See {@link Thread#Thread(} for details.
|
Thread(ThreadGroup tg,
Runnable target) |
See
Thread(ThreadGroup, Runnable) for details. |
Thread(ThreadGroup tg,
Runnable target,
String name) |
See
Thread(ThreadGroup, Runnable, String) for details. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearInterruptSource() |
Clears source and count of
Thread.interrupt() calls, if any. |
static InterruptSource.Thread |
create(ThreadGroup tg,
Runnable target,
String name) |
Depending on whether
name is null, either
Thread(ThreadGroup, Runnable, String) or
Thread(ThreadGroup, Runnable) is being utilized. |
int |
getInterruptCounter(boolean clear) |
Returns the count of
Thread.interrupt() calls. |
Throwable |
getInterruptSource(boolean clear) |
Returns the source of the last
#interrupt() call. |
void |
interrupt() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic Thread()
public Thread(ThreadGroup tg, Runnable target)
Thread(ThreadGroup, Runnable) for details.tg - explicit ThreadGroup, may be nulltarget - explicit Runnable, may be nullpublic Thread(ThreadGroup tg, Runnable target, String name)
Thread(ThreadGroup, Runnable, String) for details.tg - explicit ThreadGroup, may be nulltarget - explicit Runnable, may be nullname - explicit name of thread, must not be nullpublic static InterruptSource.Thread create(ThreadGroup tg, Runnable target, String name)
name is null, either
Thread(ThreadGroup, Runnable, String) or
Thread(ThreadGroup, Runnable) is being utilized.tg - explicit ThreadGroup, may be nulltarget - explicit Runnable, may be nullname - explicit name of thread, may be nullpublic final Throwable getInterruptSource(boolean clear)
InterruptSource#interrupt() call.getInterruptSource in interface InterruptSourceclear - if true, issues InterruptSource.clearInterruptSource()public final int getInterruptCounter(boolean clear)
InterruptSourceThread.interrupt() calls.getInterruptCounter in interface InterruptSourceclear - if true, issues InterruptSource.clearInterruptSource()public final void clearInterruptSource()
InterruptSourceThread.interrupt() calls, if any.clearInterruptSource in interface InterruptSource