|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimtools.util.AbstractCyclicCallerRunnable
public abstract class AbstractCyclicCallerRunnable
Class AbstractCyclicCallerRunnable This class permit to create a Runnable object that call cyclically to a method. It permits to be paused, resumed, and stopped. The refreshRate is configurable, as the beginning state of the cyclic caller, wether running or paused.
Field Summary | |
---|---|
static int |
STATE_PAUSED
(int) STATE_PAUSED: The paused state. |
static int |
STATE_RUNNING
(int) STATE_RUNNING: The running state. |
static int |
STATE_STOPPED
(int) STATE_STOPPED: The stopped state. |
Constructor Summary | |
---|---|
AbstractCyclicCallerRunnable()
Contructor AbstractCyclicCallerRunnable Summary: The constructor of the class AbstractCyclicCallerRunnable. |
|
AbstractCyclicCallerRunnable(boolean runningAtLaunch)
Contructor AbstractCyclicCallerRunnable Summary: The constructor of the class AbstractCyclicCallerRunnable. |
|
AbstractCyclicCallerRunnable(int refreshRate)
Contructor AbstractCyclicCallerRunnable Summary: The constructor of the class AbstractCyclicCallerRunnable. |
|
AbstractCyclicCallerRunnable(int refreshRate,
boolean runningAtLaunch)
Contructor AbstractCyclicCallerRunnable Summary: Construct an AbstractCyclicCallerRunnable, with given refreshRate. |
Method Summary | |
---|---|
int |
getStatus()
Method getStatus Summary: Return the current status of the CyclicCaller. |
void |
pause()
Method pause Summary: This method pause the runnable. |
abstract void |
process()
Method process Summary: The method that will be called cyclically by the Runnbale. |
void |
resume()
Method resume Summary: This method resume the runnable that is in STATE_PAUSED. |
void |
run()
|
void |
stop()
Method stop Summary: This method permits to stop the Runnable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STATE_RUNNING
public static final int STATE_PAUSED
public static final int STATE_STOPPED
Constructor Detail |
---|
public AbstractCyclicCallerRunnable()
public AbstractCyclicCallerRunnable(int refreshRate)
refreshRate
- The refresh rate to use in the cyclic caller.public AbstractCyclicCallerRunnable(boolean runningAtLaunch)
runningAtLaunch
- True to launch the cyclic caller in RUNNING state, false to launch in paused state.public AbstractCyclicCallerRunnable(int refreshRate, boolean runningAtLaunch)
refreshRate
- The refreshRate of the CyclicCaller, in millisecondsrunningAtLaunch
- True to launch the cyclic caller in RUNNING state, false to launch in paused state.Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public abstract void process()
public void resume()
public void pause()
public void stop()
public int getStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |