| java.lang.Object org.apache.commons.scxml.semantics.SCXMLSemanticsImpl
SCXMLSemanticsImpl | public class SCXMLSemanticsImpl implements SCXMLSemantics,Serializable(Code) | | This class encapsulates a particular SCXML semantics, that is, a
particular semantic interpretation of Harel Statecharts, which aligns
mostly with W3C SCXML July 5 public draft (that is, UML 1.5). However,
certain aspects are taken from STATEMATE.
Specific semantics can be created by subclassing this class.
|
Method Summary | |
public void | determineInitialStates(SCXML input, Set states, List entryList, ErrorReporter errRep, SCInstance scInstance) | public void | determineTargetStates(Set states, ErrorReporter errRep, SCInstance scInstance) | public void | enumerateReachableTransitions(SCXML stateMachine, Step step, ErrorReporter errRep) | protected boolean | eventMatch(String transEvent, Set eventOccurrences) Implements prefix match, that is, if, for example,
"mouse.click" is a member of eventOccurrences and a
transition is triggered by "mouse", the method returns true. | public void | executeActions(Step step, SCXML stateMachine, EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance) Executes all OnExit/Transition/OnEntry transitional actions. | public void | filterTransitionsSet(Step step, EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance) | protected boolean | finalizeMatch(String parentStateId, Set eventOccurrences) Implements event prefix match to ascertain <finalize> execution. | public void | followTransitions(Step step, ErrorReporter errorReporter, SCInstance scInstance) Follow the candidate transitions for this execution Step, and update the
lists of entered and exited states accordingly. | protected Log | getLog() Get the log used by this SCXMLSemantics instance. | protected Comparator | getTTComparator() TransitionTargetComparator factory method. | public void | initiateInvokes(Step step, ErrorReporter errRep, SCInstance scInstance) Initiate any new invokes. | public SCXML | normalizeStateMachine(SCXML input, ErrorReporter errRep) | public void | processInvokes(TriggerEvent[] events, ErrorReporter errRep, SCInstance scInstance) Process any existing invokes, includes forwarding external events,
and executing any finalize handlers. | public Set | seedTargetSet(Set residual, List transitList, ErrorReporter errRep) Populate the target set. | protected void | setLog(Log log) Set the log used by this SCXMLSemantics instance. | public void | updateHistoryStates(Step step, ErrorReporter errRep, SCInstance scInstance) Go over the exit list and update history information for
relevant states. |
determineInitialStates | public void determineInitialStates(SCXML input, Set states, List entryList, ErrorReporter errRep, SCInstance scInstance) throws ModelException(Code) | | Parameters: input - SCXML state machine [in] Parameters: states - a set of States to populate [out] Parameters: entryList - a list of States and Parallels to enter [out] Parameters: errRep - ErrorReporter callback [inout] Parameters: scInstance - The state chart instance [in] throws: ModelException - in case there is a fatal SCXML object model problem. |
enumerateReachableTransitions | public void enumerateReachableTransitions(SCXML stateMachine, Step step, ErrorReporter errRep)(Code) | | Parameters: stateMachine - a SM to traverse [in] Parameters: step - with current status and list of transitions to populate[inout] Parameters: errRep - ErrorReporter callback [inout] |
eventMatch | protected boolean eventMatch(String transEvent, Set eventOccurrences)(Code) | | Implements prefix match, that is, if, for example,
"mouse.click" is a member of eventOccurrences and a
transition is triggered by "mouse", the method returns true.
Parameters: transEvent - a trigger event of a transition Parameters: eventOccurrences - current events true/false |
executeActions | public void executeActions(Step step, SCXML stateMachine, EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance) throws ModelException(Code) | | Executes all OnExit/Transition/OnEntry transitional actions.
Parameters: step - provides EntryList, TransitList, ExitList getsupdated its AfterStatus/Events Parameters: stateMachine - state machine - SCXML instance Parameters: evtDispatcher - the event dispatcher - EventDispatcher instance Parameters: errRep - error reporter Parameters: scInstance - The state chart instance throws: ModelException - in case there is a fatal SCXML object model problem. |
finalizeMatch | protected boolean finalizeMatch(String parentStateId, Set eventOccurrences)(Code) | | Implements event prefix match to ascertain <finalize> execution.
Parameters: parentStateId - the ID of the parent state of the <invoke> holdingthe <finalize> Parameters: eventOccurrences - current events true/false |
followTransitions | public void followTransitions(Step step, ErrorReporter errorReporter, SCInstance scInstance) throws ModelException(Code) | | Follow the candidate transitions for this execution Step, and update the
lists of entered and exited states accordingly.
Parameters: step - The current Step Parameters: errorReporter - The ErrorReporter for the current environment Parameters: scInstance - The state chart instance throws: ModelException - in case there is a fatal SCXML object model problem. |
getLog | protected Log getLog()(Code) | | Get the log used by this SCXMLSemantics instance.
Log The log being used. |
getTTComparator | protected Comparator getTTComparator()(Code) | | TransitionTargetComparator factory method.
Comparator The TransitionTarget comparator |
initiateInvokes | public void initiateInvokes(Step step, ErrorReporter errRep, SCInstance scInstance)(Code) | | Initiate any new invokes.
Parameters: step - The current Step Parameters: errRep - ErrorReporter callback Parameters: scInstance - The state chart instance |
normalizeStateMachine | public SCXML normalizeStateMachine(SCXML input, ErrorReporter errRep)(Code) | | Parameters: input - SCXML state machine normalized SCXML state machine, pseudo states are removed, etc. Parameters: errRep - ErrorReporter callback |
processInvokes | public void processInvokes(TriggerEvent[] events, ErrorReporter errRep, SCInstance scInstance) throws ModelException(Code) | | Process any existing invokes, includes forwarding external events,
and executing any finalize handlers.
Parameters: events - The events to be forwarded Parameters: errRep - ErrorReporter callback Parameters: scInstance - The state chart instance throws: ModelException - in case there is a fatal SCXML object model problem. |
seedTargetSet | public Set seedTargetSet(Set residual, List transitList, ErrorReporter errRep)(Code) | | Populate the target set.
- take targets of selected transitions
- take exited regions into account and make sure every active
parallel region has all siblings active
[that is, explicitly visit or sibling regions in case of newly visited
(revisited) orthogonal states]
Parameters: residual - [in] Parameters: transitList - [in] Parameters: errRep - ErrorReporter callback [inout] Set The target set |
setLog | protected void setLog(Log log)(Code) | | Set the log used by this SCXMLSemantics instance.
Parameters: log - The new log. |
updateHistoryStates | public void updateHistoryStates(Step step, ErrorReporter errRep, SCInstance scInstance)(Code) | | Go over the exit list and update history information for
relevant states.
Parameters: step - [inout] Parameters: errRep - ErrorReporter callback [inout] Parameters: scInstance - The state chart instance [inout] |
|
|