|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.cornell.cs.sam.utils.SamThread
public abstract class SamThread
The base class for threads in SaM GUIs. It implements the basics that all such threads responsible for running code need
Nested Class Summary | |
---|---|
static interface |
SamThread.ThreadParent
The parent of a thread |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
THREAD_EXCEPTION
A thread status indication there was an exception in the thread |
static int |
THREAD_EXIT_OK
A thread status indication successful completion |
static int |
THREAD_INTERRUPTED
A thread status indicating that the thread has been interrupted |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
SamThread()
|
Method Summary | |
---|---|
abstract void |
execute()
The main method used to execute one step. |
SamThread.ThreadParent |
getParent()
Returns the thread parent |
void |
interrupt()
Interrupts the thread |
boolean |
interruptRequested()
Check if an interrupt has been requested |
void |
run()
Initiates thread execution. |
void |
setParent(SamThread.ThreadParent parent)
Sets the parent to the provided parent param parent The parent to set |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int THREAD_INTERRUPTED
public static final int THREAD_EXCEPTION
public static final int THREAD_EXIT_OK
Constructor Detail |
---|
public SamThread()
Method Detail |
---|
public void setParent(SamThread.ThreadParent parent)
public SamThread.ThreadParent getParent()
public void interrupt()
interrupt
in class java.lang.Thread
public boolean interruptRequested()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public abstract void execute() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |