public static class InterruptSource.Thread extends Thread implements InterruptSource
Thread.State, Thread.UncaughtExceptionHandlerInterruptSource.Thread, InterruptSource.UtilMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
InterruptSource.Thread()
See
Thread#Thread( for details. |
InterruptSource.Thread(ThreadGroup tg,
Runnable target)
See
Thread.Thread(ThreadGroup, Runnable) for details. |
InterruptSource.Thread(ThreadGroup tg,
Runnable target,
String name)
See
Thread.Thread(ThreadGroup, Runnable, String) for details. |
| Modifier and Type | Method and 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() |
activeCount, 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, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic InterruptSource.Thread()
Thread#Thread( for details.public InterruptSource.Thread(ThreadGroup tg, Runnable target)
Thread.Thread(ThreadGroup, Runnable) for details.tg - explicit ThreadGroup, may be nulltarget - explicit Runnable, may be nullpublic InterruptSource.Thread(ThreadGroup tg, Runnable target, String name)
Thread.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