Package com.jogamp.common.util
Class InterruptSource.Thread
java.lang.Object
java.lang.Thread
com.jogamp.common.util.InterruptSource.Thread
- All Implemented Interfaces:
InterruptSource,Runnable
- Enclosing interface:
- InterruptSource
- Since:
- 2.3.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandlerNested classes/interfaces inherited from interface com.jogamp.common.util.InterruptSource
InterruptSource.Thread, InterruptSource.Util -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionThread()See {@link Thread#Thread(} for details.Thread(ThreadGroup tg, Runnable target) SeeThread(ThreadGroup, Runnable)for details.Thread(ThreadGroup tg, Runnable target, String name) SeeThread(ThreadGroup, Runnable, String)for details. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidClears source and count ofThread.interrupt()calls, if any.static InterruptSource.Threadcreate(ThreadGroup tg, Runnable target, String name) Depending on whethernameis null, eitherThread(ThreadGroup, Runnable, String)orThread(ThreadGroup, Runnable)is being utilized.final intgetInterruptCounter(boolean clear) Returns the count ofThread.interrupt()calls.final ThrowablegetInterruptSource(boolean clear) Returns the source of the last#interrupt()call.final voidMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, 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, suspend, toString, yield
-
Constructor Details
-
Thread
public Thread()See {@link Thread#Thread(} for details. -
Thread
SeeThread(ThreadGroup, Runnable)for details.- Parameters:
tg- explicitThreadGroup, may benulltarget- explicitRunnable, may benull
-
Thread
SeeThread(ThreadGroup, Runnable, String)for details.- Parameters:
tg- explicitThreadGroup, may benulltarget- explicitRunnable, may benullname- explicit name of thread, must not benull
-
-
Method Details
-
create
Depending on whethernameis null, eitherThread(ThreadGroup, Runnable, String)orThread(ThreadGroup, Runnable)is being utilized.- Parameters:
tg- explicitThreadGroup, may benulltarget- explicitRunnable, may benullname- explicit name of thread, may benull
-
getInterruptSource
Description copied from interface:InterruptSourceReturns the source of the last#interrupt()call.- Specified by:
getInterruptSourcein interfaceInterruptSource- Parameters:
clear- if true, issuesInterruptSource.clearInterruptSource()
-
getInterruptCounter
public final int getInterruptCounter(boolean clear) Description copied from interface:InterruptSourceReturns the count ofThread.interrupt()calls.- Specified by:
getInterruptCounterin interfaceInterruptSource- Parameters:
clear- if true, issuesInterruptSource.clearInterruptSource()
-
clearInterruptSource
public final void clearInterruptSource()Description copied from interface:InterruptSourceClears source and count ofThread.interrupt()calls, if any.- Specified by:
clearInterruptSourcein interfaceInterruptSource
-
interrupt
public final void interrupt()
-