|
|||||||||||
| 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
A Thread that loops over a runLoop().
| 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(String name)
Get a LoopingThread with a specified name. |
protected |
LoopingThread(ThreadGroup tg,
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 msPerLoop)
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, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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(String name)
protected LoopingThread(ThreadGroup tg,
String name)
| Method Detail |
public void setMsPerLoop(int msPerLoop)
msPerLoop - number of milliseconds to delay between loopspublic int getMsPerLoop()
public void requestStop()
protected abstract void runLoop()
protected void performDelay()
public void run()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||