org.apache.commons.scxml.model
Class Action

java.lang.Object
  extended byorg.apache.commons.scxml.model.Action
Direct Known Subclasses:
Assign, Cancel, ElseIf, Exit, If, Log, Send, Var

public abstract class Action
extends Object

An abstract base class for executable elements in SCXML, such as <assign>, <log> etc.


Constructor Summary
Action()
          Constructor.
 
Method Summary
abstract  void execute(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, org.apache.commons.logging.Log appLog, Collection derivedEvents)
          Execute this action instance.
 Executable getParent()
          Get the Executable parent.
 State getParentState()
          Return the parent state.
 void setParent(Executable parent)
          Set the Executable parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action()
Constructor.

Method Detail

getParent

public final Executable getParent()
Get the Executable parent.

Returns:
Returns the parent.

setParent

public final void setParent(Executable parent)
Set the Executable parent.

Parameters:
parent - The parent to set.

getParentState

public final State getParentState()
                           throws ModelException
Return the parent state.

Returns:
The parent State
Throws:
ModelException - For an unknown TransitionTarget subclass

execute

public abstract void execute(EventDispatcher evtDispatcher,
                             ErrorReporter errRep,
                             SCInstance scInstance,
                             org.apache.commons.logging.Log appLog,
                             Collection derivedEvents)
                      throws ModelException,
                             SCXMLExpressionException
Execute this action instance.

Parameters:
evtDispatcher - The EventDispatcher for this execution instance
errRep - The ErrorReporter to broadcast any errors during execution.
scInstance - The state machine execution instance information.
appLog - The application Log.
derivedEvents - The collection to which any internal events arising from the execution of this action must be added.
Throws:
ModelException - If the execution causes the model to enter a non-deterministic state.
SCXMLExpressionException - If the execution involves trying to evaluate an expression which is malformed.


Copyright © 2005-2006 The Apache Software Foundation. All Rights Reserved.