|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
net.spy.SpyThread
net.spy.util.LoopingThread
public abstract class LoopingThread
A Thread that loops over a runLoop().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
DEFAULT_MS_PER_LOOP
Default number of milliseconds to spend on each loop. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
protected |
LoopingThread()
Get an instance of LoopingThread. |
protected |
LoopingThread(java.lang.String name)
Get a LoopingThread with a specified name. |
protected |
LoopingThread(java.lang.ThreadGroup tg,
java.lang.String name)
Get a looping thread belonging to a specific group and having the specified name. |
| Method Summary | |
|---|---|
int |
getMsPerLoop()
Get the number of milliseconds to sleep during each loop. |
protected void |
performDelay()
Method to pause between loops. |
void |
requestStop()
Request the looping should end. |
void |
run()
The run loop itself. |
protected abstract void |
runLoop()
This is the stuff that should happen during each execution of the run loop. |
void |
setMsPerLoop(int to)
Set the number of milliseconds to sleep during each loop. |
| Methods inherited from class net.spy.SpyThread |
|---|
getLogger |
| 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 |
| Field Detail |
|---|
public static final int DEFAULT_MS_PER_LOOP
| Constructor Detail |
|---|
protected LoopingThread()
protected LoopingThread(java.lang.String name)
protected LoopingThread(java.lang.ThreadGroup tg,
java.lang.String name)
| Method Detail |
|---|
public void setMsPerLoop(int to)
to - number of milliseconds to delay between loopspublic int getMsPerLoop()
public void requestStop()
protected abstract void runLoop()
protected void performDelay()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||