|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.scxml.semantics.SCXMLSemanticsImpl
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.
| Constructor Summary | |
SCXMLSemanticsImpl()
|
|
| Method Summary | |
void |
determineInitialStates(SCXML input,
Set targets,
List entryList,
ErrorReporter errRep,
SCInstance scInstance)
Determining the initial state(s) for this state machine. |
void |
determineTargetStates(Set states,
ErrorReporter errRep,
SCInstance scInstance)
|
void |
enumerateReachableTransitions(SCXML stateMachine,
Step step,
ErrorReporter errRep)
Enumerate all the reachable transitions. |
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. |
void |
executeActions(Step step,
SCXML stateMachine,
EventDispatcher evtDispatcher,
ErrorReporter errRep,
SCInstance scInstance)
Executes all OnExit/Transition/OnEntry transitional actions. |
void |
filterTransitionsSet(Step step,
EventDispatcher evtDispatcher,
ErrorReporter errRep,
SCInstance scInstance)
Filter the transitions set, eliminate those whose guard conditions are not satisfied. |
protected boolean |
finalizeMatch(String parentStateId,
Set eventOccurrences)
Implements event prefix match to ascertain <finalize> execution. |
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 org.apache.commons.logging.Log |
getLog()
Get the log used by this SCXMLSemantics instance. |
protected Comparator |
getTTComparator()
TransitionTargetComparator factory method. |
void |
initiateInvokes(Step step,
ErrorReporter errRep,
SCInstance scInstance)
Initiate any new invokes. |
SCXML |
normalizeStateMachine(SCXML input,
ErrorReporter errRep)
Optional post processing immediately following Digester. |
void |
processInvokes(TriggerEvent[] events,
ErrorReporter errRep,
SCInstance scInstance)
Process any existing invokes, includes forwarding external events, and executing any finalize handlers. |
Set |
seedTargetSet(Set residual,
List transitList,
ErrorReporter errRep)
Populate the target set. |
protected void |
setLog(org.apache.commons.logging.Log log)
Set the log used by this SCXMLSemantics instance. |
void |
updateHistoryStates(Step step,
ErrorReporter errRep,
SCInstance scInstance)
Go over the exit list and update history information for relevant states. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SCXMLSemanticsImpl()
| Method Detail |
public SCXML normalizeStateMachine(SCXML input,
ErrorReporter errRep)
SCXMLSemantics
normalizeStateMachine in interface SCXMLSemanticsinput - SCXML state machineerrRep - ErrorReporter callback
public void determineInitialStates(SCXML input,
Set targets,
List entryList,
ErrorReporter errRep,
SCInstance scInstance)
throws ModelException
SCXMLSemantics
determineInitialStates in interface SCXMLSemanticsinput - SCXML state machine [in]targets - a set of initial targets to populate [out]entryList - a list of States and Parallels to enter [out]errRep - ErrorReporter callback [inout]scInstance - The state chart instance [in]
ModelException - in case there is a fatal SCXML object model problem.
public void executeActions(Step step,
SCXML stateMachine,
EventDispatcher evtDispatcher,
ErrorReporter errRep,
SCInstance scInstance)
throws ModelException
executeActions in interface SCXMLSemanticsstep - provides EntryList, TransitList, ExitList gets
updated its AfterStatus/EventsstateMachine - state machine - SCXML instanceevtDispatcher - the event dispatcher - EventDispatcher instanceerrRep - error reporterscInstance - The state chart instance
ModelException - in case there is a fatal SCXML object model problem.
public void enumerateReachableTransitions(SCXML stateMachine,
Step step,
ErrorReporter errRep)
SCXMLSemantics
enumerateReachableTransitions in interface SCXMLSemanticsstateMachine - a SM to traverse [in]step - with current status and list of transitions to populate
[inout]errRep - ErrorReporter callback [inout]
public void filterTransitionsSet(Step step,
EventDispatcher evtDispatcher,
ErrorReporter errRep,
SCInstance scInstance)
throws ModelException
SCXMLSemantics
filterTransitionsSet in interface SCXMLSemanticsstep - [inout]evtDispatcher - The EventDispatcher [in]errRep - ErrorReporter callback [inout]scInstance - The state chart instance [in]
ModelException - in case there is a fatal SCXML object model problem.
public Set seedTargetSet(Set residual,
List transitList,
ErrorReporter errRep)
residual - [in]transitList - [in]errRep - ErrorReporter callback [inout]
public void determineTargetStates(Set states,
ErrorReporter errRep,
SCInstance scInstance)
throws ModelException
states - a set seeded in previous step [inout]errRep - ErrorReporter callback [inout]scInstance - The state chart instance [in]
ModelException - On illegal configurationseedTargetSet(Set, List, ErrorReporter)
public void updateHistoryStates(Step step,
ErrorReporter errRep,
SCInstance scInstance)
updateHistoryStates in interface SCXMLSemanticsstep - [inout]errRep - ErrorReporter callback [inout]scInstance - The state chart instance [inout]
public void followTransitions(Step step,
ErrorReporter errorReporter,
SCInstance scInstance)
throws ModelException
followTransitions in interface SCXMLSemanticsstep - The current SteperrorReporter - The ErrorReporter for the current environmentscInstance - The state chart instance
ModelException - in case there is a fatal SCXML object model problem.
public void processInvokes(TriggerEvent[] events,
ErrorReporter errRep,
SCInstance scInstance)
throws ModelException
processInvokes in interface SCXMLSemanticsevents - The events to be forwardederrRep - ErrorReporter callbackscInstance - The state chart instance
ModelException - in case there is a fatal SCXML object model problem.
public void initiateInvokes(Step step,
ErrorReporter errRep,
SCInstance scInstance)
initiateInvokes in interface SCXMLSemanticsstep - The current SteperrRep - ErrorReporter callbackscInstance - The state chart instance
protected boolean eventMatch(String transEvent,
Set eventOccurrences)
transEvent - a trigger event of a transitioneventOccurrences - current events
protected boolean finalizeMatch(String parentStateId,
Set eventOccurrences)
parentStateId - the ID of the parent state of the <invoke> holding
the <finalize>eventOccurrences - current events
protected Comparator getTTComparator()
protected void setLog(org.apache.commons.logging.Log log)
SCXMLSemantics instance.
log - The new log.protected org.apache.commons.logging.Log getLog()
SCXMLSemantics instance.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||