se.ericsson.eto.norarc.javaframe
Class TimerMsg
java.lang.Object
se.ericsson.eto.norarc.javaframe.Message
se.ericsson.eto.norarc.javaframe.TimerMsg
- All Implemented Interfaces:
- java.lang.Cloneable
- public class TimerMsg
- extends Message
A class to include Timers into the JavaFrame machinery.
The TimerMsg is a Message that is included in the appropriate Message queue
whenever the given time has elapsed.
A Timer must be created (and thus initiatied with a delay), and then it must be started.
A Timer may then time out in which case it is entered into the message queue.
A Timer may be stopped before it has timed out (or before it has been consumed). Then there will
be no sign of the TimerMsg.
Method Summary |
void |
setDelay(int timeDelay)
|
void |
startTimer()
Starts the timer with current delay |
void |
startTimer(int timeDelay)
Starts the timer with a new delay |
void |
stopTimer()
Stops the Timer.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jfTimer
protected static java.util.Timer jfTimer
timedStateMachine
protected StateMachine timedStateMachine
jfTT
protected TimerMsg.JFTimerTask jfTT
TimerMsg
public TimerMsg(int timedelay,
StateMachine myStateMachine)
- Parameters:
timedelay
- The delay in milliseconds of the timer from its startmyStateMachine
- the StateMachine that is associated with this TimerMsg
setDelay
public void setDelay(int timeDelay)
- Parameters:
timeDelay
- The new delay in milliseconds
startTimer
public void startTimer()
- Starts the timer with current delay
startTimer
public void startTimer(int timeDelay)
- Starts the timer with a new delay
- Parameters:
timeDelay
- New delay in milliseconds
stopTimer
public void stopTimer()
- Stops the Timer.
It will also be removed from the message queue if it is already included there