|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.com.lastweekend.jen.util.LoopRunnable
public abstract class LoopRunnable
Once started repeatedly runs a loop until stopped.
| Constructor Summary | |
|---|---|
LoopRunnable()
|
|
| Method Summary | |
|---|---|
protected abstract void |
loop()
This method will run repeatedly until the stop method is called or the method throws an exception. |
void |
run()
|
java.lang.Thread |
start(java.lang.String name)
Convenience method to start this runnable in a new thread. |
void |
stop()
Stops the loop. |
void |
stopAtShutdown()
Adds a shutdown hook to stop this process when the JVM shuts down. |
protected void |
stopped()
Called when the loop exits. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoopRunnable()
| Method Detail |
|---|
protected void stopped()
protected abstract void loop()
public final void run()
run in interface java.lang.Runnablepublic final void stop()
public java.lang.Thread start(java.lang.String name)
name -
public final void stopAtShutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||