|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
uk.ac.ic.doc.automed.util.thread.TimedThread
public class TimedThread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TimedThread(long sleepTime,
Threadable threadableObj,
boolean daemon)
An overloading constructor for instant running of a thread object |
|
TimedThread(java.lang.String name,
int id,
long sleepTime,
Threadable threadableObj,
boolean daemon)
Creates a new instance of TimedThread |
|
TimedThread(java.lang.String name,
long sleepTime,
Threadable threadableObj,
boolean daemon)
An overloading constructor for instant running of a thread object |
|
TimedThread(Threadable threadableObj,
boolean daemon)
An overloading constructor for instant running of a thread object |
|
| Method Summary | |
|---|---|
static java.lang.String |
getDefaultName()
Return the default, unique name for a thread |
static int |
getNextID()
Get the next id counter for a new thread |
boolean |
getReadyState()
Get the state of the handler object (ready or note). |
Threadable |
getThreadObject()
Return the threadable object |
boolean |
isStopped()
Check if a thread is started or not |
void |
restartThread()
To restart, stop and start it |
void |
run()
Implements the thread-running method |
void |
startThread()
Start (rather resume) a thread's operation |
void |
stopThread()
Stop (rather pause) a thread |
| 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, interrupt, 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 |
| Constructor Detail |
|---|
public TimedThread(java.lang.String name,
int id,
long sleepTime,
Threadable threadableObj,
boolean daemon)
name - a meaningful name for thread objectid - a unique thread's idsleepTime - a sleep time in secondsthreadableObj - a thread-handling objectdaemon - whether or not to create a daemon-like thread
public TimedThread(java.lang.String name,
long sleepTime,
Threadable threadableObj,
boolean daemon)
public TimedThread(long sleepTime,
Threadable threadableObj,
boolean daemon)
public TimedThread(Threadable threadableObj,
boolean daemon)
| Method Detail |
|---|
public void stopThread()
public void startThread()
public boolean isStopped()
public void restartThread()
public boolean getReadyState()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic static java.lang.String getDefaultName()
public Threadable getThreadObject()
public static int getNextID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||