org.echarts
Class TransitionTimerPort

java.lang.Object
  extended by org.echarts.Port
      extended by org.echarts.LocalPort
          extended by org.echarts.TransitionTimerPort
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, PortReference

public final class TransitionTimerPort
extends LocalPort
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class org.echarts.LocalPort
inputQueue
 
Constructor Summary
TransitionTimerPort(TransitionMachine machine, TransitionTimerPortDurationMethod durationMethod)
           
 
Method Summary
 long getActivationTime()
          Returns most recent activation time of the transition associated with this port.
 long getActualExpiryTime()
          Returns most recent actual expiry time of the transition associated with this port.
 java.lang.Long getDesiredExpiryTime()
          Called by TransitionTimer when determining if transition associated with this port should be enabled.
 long getDuration()
          Called by TransitionTimer to obtain current transition duration value when activating the transition.
 TransitionMachine getMachine()
          Returns a reference to this port's declaring machine.
 PortProperties getMonitorProperties()
          Returns port's monitor properties.
 TransitionTimeoutMessage getTimeoutMessage()
          Called by TransitionTimer after transition has timed out.
 void input(TransitionTimeoutMessage message)
          Puts timeout message in port's input queue.
 void setActivationTime(long activationTime)
          Called by TransitionTimer when timer associated with this port's transition is activated.
 void setDesiredExpiryTime(java.lang.Long desiredExpiryTime)
          Called by TransitionTimer once it has determined when the transition associated with this port should expire.
 
Methods inherited from class org.echarts.LocalPort
clearMachineReference, getDynamicChildIndex, getDynamicParent, getInputQueue, isPossiblyReferencedBy, isPossiblyReferencedBySupermachineOf, isUniquelyReferenced, isUniquelyReferencedByMachine, setMachineReference
 
Methods inherited from class org.echarts.Port
equals, getID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

TransitionTimerPort

public TransitionTimerPort(TransitionMachine machine,
                           TransitionTimerPortDurationMethod durationMethod)
Method Detail

getDesiredExpiryTime

public java.lang.Long getDesiredExpiryTime()
Called by TransitionTimer when determining if transition associated with this port should be enabled.


setDesiredExpiryTime

public void setDesiredExpiryTime(java.lang.Long desiredExpiryTime)
Called by TransitionTimer once it has determined when the transition associated with this port should expire.


getDuration

public long getDuration()
                 throws java.lang.Exception
Called by TransitionTimer to obtain current transition duration value when activating the transition.

Throws:
java.lang.Exception

getActualExpiryTime

public long getActualExpiryTime()
Returns most recent actual expiry time of the transition associated with this port. Actual expiry time is set by TranstionTimer when this port's getTimeoutMessage() method is called.


getActivationTime

public long getActivationTime()
Returns most recent activation time of the transition associated with this port. This value is set by TransitionTimer when this port's setActivationTime() method is called.


setActivationTime

public void setActivationTime(long activationTime)
Called by TransitionTimer when timer associated with this port's transition is activated.


getTimeoutMessage

public TransitionTimeoutMessage getTimeoutMessage()
Called by TransitionTimer after transition has timed out. Side-effect is to set actualExpiryTime.


input

public void input(TransitionTimeoutMessage message)
Puts timeout message in port's input queue. Port argument of PortMessage indicates destination timer port (this port).


getMachine

public TransitionMachine getMachine()
Returns a reference to this port's declaring machine.


getMonitorProperties

public PortProperties getMonitorProperties()
Returns port's monitor properties.

Specified by:
getMonitorProperties in class LocalPort