com.xj.anylogic.engine
Class TransitionMessage

java.lang.Object
  extended by com.xj.anylogic.engine.EventOriginator
      extended by com.xj.anylogic.engine.Transition
          extended by com.xj.anylogic.engine.TransitionMessage
All Implemented Interfaces:
com.xj.anylogic.engine.internal.Child, java.io.Serializable

public class TransitionMessage
extends Transition

Statechart transition with trigger of type message. Such transition is executed when the statechart receives a message (integer or Object) that conforms with the transition trigger. If the guard appears to be false when the transition is about to execute, it is not taken and becomes inactive until the next message arrival.
Memory: sizeof(Transition) + 8 bytes = 30 bytes

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Constructor Summary
TransitionMessage(ActiveObject ao)
          Constructs the transition object with Message trigger.
 
Method Summary
 void cancel()
          Should be called when this transition becomes deactivated e.g. as a result of alternative transition being taken.
 java.lang.String getName()
          Returns the name of the message tranistion as specified by the user.
 void start()
          Should be called whe the statechart enters to the transition's source state.
 
Methods inherited from class com.xj.anylogic.engine.Transition
restoreOwner
 
Methods inherited from class com.xj.anylogic.engine.EventOriginator
getActiveObject, getFullName, getRest, isActive, onDestroy, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransitionMessage

public TransitionMessage(ActiveObject ao)
Constructs the transition object with Message trigger. Does not activate it.

Parameters:
ao - active object where this transition belongs to
Method Detail

getName

public java.lang.String getName()
Returns the name of the message tranistion as specified by the user.

Specified by:
getName in class EventOriginator
Returns:
The name of the tranistion

start

public void start()
Should be called whe the statechart enters to the transition's source state. Performs initial event scheduling. Adds this transition to the statechart active list. Must be called in a subclass.


cancel

public void cancel()
Should be called when this transition becomes deactivated e.g. as a result of alternative transition being taken. Clears the message.

Specified by:
cancel in class Transition


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.