Modifier and Type | Class and Description |
---|---|
static interface |
InterruptedStatusThread.Interruptable
A Runnable task can implement this to be interrupted if something
special needs to be done to cause the Runnable to notice it's been
interrupted.
|
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
InterruptedStatusThread()
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(Runnable target)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(Runnable target,
String name)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(String name)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(ThreadGroup group,
Runnable target)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(ThreadGroup group,
Runnable target,
String name)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(ThreadGroup group,
Runnable target,
String name,
long stackSize)
Constructs a new
InterruptedStatusThread object. |
InterruptedStatusThread(ThreadGroup group,
String name)
Constructs a new
InterruptedStatusThread object. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasBeenInterrupted()
Method used to determine if
interrupt has been called
on this thread. |
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, yield
public InterruptedStatusThread()
InterruptedStatusThread
object.public InterruptedStatusThread(Runnable target)
InterruptedStatusThread
object.target
- the object whose run
method is calledpublic InterruptedStatusThread(Runnable target, String name)
InterruptedStatusThread
object.target
- the object whose run
method is calledname
- the name of the new threadpublic InterruptedStatusThread(String name)
InterruptedStatusThread
object.name
- the name of the new threadpublic InterruptedStatusThread(ThreadGroup group, Runnable target)
InterruptedStatusThread
object.group
- the thread grouptarget
- the object whose run
method is calledpublic InterruptedStatusThread(ThreadGroup group, Runnable target, String name)
InterruptedStatusThread
object.group
- the thread grouptarget
- the object whose run
method is calledname
- the name of the new threadpublic InterruptedStatusThread(ThreadGroup group, Runnable target, String name, long stackSize)
InterruptedStatusThread
object.group
- the thread grouptarget
- the object whose run
method is calledname
- the name of the new threadstackSize
- the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignoredpublic InterruptedStatusThread(ThreadGroup group, String name)
InterruptedStatusThread
object.group
- the thread groupname
- the name of the new threadCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.