|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ros.concurrent.CancellableLoop
public abstract class CancellableLoop
An interruptable loop that can be run by an ExecutorService.
| Constructor Summary | |
|---|---|
CancellableLoop()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Interrupts the loop. |
protected void |
handleInterruptedException(java.lang.InterruptedException e)
An InterruptedException was thrown. |
boolean |
isRunning()
|
protected abstract void |
loop()
The body of the loop. |
void |
run()
|
protected void |
setup()
The setup block for the loop. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CancellableLoop()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnableprotected void setup()
loop().
protected abstract void loop()
throws java.lang.InterruptedException
CancellableLoop has been interrupted externally or by calling
cancel().
java.lang.InterruptedExceptionprotected void handleInterruptedException(java.lang.InterruptedException e)
InterruptedException was thrown.
public void cancel()
public boolean isRunning()
true if the loop is running
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||