se.ericsson.eto.norarc.javaframe
Class TimerMsg

java.lang.Object
  extended byse.ericsson.eto.norarc.javaframe.Message
      extended byse.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.


Nested Class Summary
 class TimerMsg.JFTimerTask
           
 
Field Summary
protected static java.util.Timer jfTimer
           
protected  TimerMsg.JFTimerTask jfTT
           
protected  StateMachine timedStateMachine
           
 
Fields inherited from class se.ericsson.eto.norarc.javaframe.Message
nextMessage
 
Constructor Summary
TimerMsg(int timedelay, StateMachine myStateMachine)
           
 
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 se.ericsson.eto.norarc.javaframe.Message
del, duplicate, messageContent, messageName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jfTimer

protected static java.util.Timer jfTimer

timedStateMachine

protected StateMachine timedStateMachine

jfTT

protected TimerMsg.JFTimerTask jfTT
Constructor Detail

TimerMsg

public TimerMsg(int timedelay,
                StateMachine myStateMachine)
Parameters:
timedelay - The delay in milliseconds of the timer from its start
myStateMachine - the StateMachine that is associated with this TimerMsg
Method Detail

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