|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.x8ing.lsm4j.state.StaticGraph
com.x8ing.lsm4j.state.ProcessableGraph
public class ProcessableGraph
This class is the entry point for building a state machine. It keeps track of the graph layout and acts as controller for running it.
How to use this class is described in the tutorial link .
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.x8ing.lsm4j.state.StaticGraph |
|---|
StaticGraph.StateIterator, StaticGraph.TransitionList |
| Constructor Summary | |
|---|---|
ProcessableGraph()
|
|
| Method Summary | |
|---|---|
void |
addValidTransition(ProcessableState currentState,
ProcessableState nextState,
Condition condition)
|
void |
addValidTransition(ProcessableState currentState,
ProcessableState nextState,
Condition condition,
Action transitionAction)
|
java.util.List |
getGraphListeners()
A list with all listeners. |
java.util.List |
getLastVisitedStatesHistoryList()
A list with the last visited states. |
int |
getLastVisitedStatesHistorySize()
|
long |
getMaximumLoops()
|
void |
registerGraphListener(GraphListener graphListener)
|
ProcessableState |
run(int startStateID,
StateContext startStateContext)
Starts the processing of the graph. |
ProcessableState |
run(int startStateID,
StateContext startStateContext,
int numberOfSteps)
Run the graph for a defined number of transitions. |
ProcessableState |
runContinue()
Continues the processing of the previously interrupted graph. |
ProcessableState |
runContinue(int numberOfSteps)
Continues the processing of the previously interrupted graph with a limited amount of transitions. |
void |
setLastVisitedStatesHistorySize(int lastVisitedStatesHistorySize)
|
void |
setMaximumLoops(long maximumLoops)
|
boolean |
unregisterGraphListener(GraphListener graphListener)
|
| Methods inherited from class com.x8ing.lsm4j.state.StaticGraph |
|---|
addTransition, addValidTransition, addValidTransition, getStateCount, getStateWithID, getTransitionListForState, getTransitionsBetweenStates, getTransitionsCount, isValidTransition, isValidTransition, printGraph, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessableGraph()
| Method Detail |
|---|
public void addValidTransition(ProcessableState currentState,
ProcessableState nextState,
Condition condition,
Action transitionAction)
public void addValidTransition(ProcessableState currentState,
ProcessableState nextState,
Condition condition)
public ProcessableState runContinue(int numberOfSteps)
throws NoMatchingTransitionConditionFoundException,
MaximumIterationsReachedException
numberOfSteps - the number of transitions to be executed.
NoMatchingTransitionConditionFoundException
MaximumIterationsReachedException
public ProcessableState runContinue()
throws NoMatchingTransitionConditionFoundException,
MaximumIterationsReachedException
NoMatchingTransitionConditionFoundException
MaximumIterationsReachedException
public ProcessableState run(int startStateID,
StateContext startStateContext)
throws NoMatchingTransitionConditionFoundException,
MaximumIterationsReachedException
startStateID - startStateContext -
NoMatchingTransitionConditionFoundException
MaximumIterationsReachedException
public ProcessableState run(int startStateID,
StateContext startStateContext,
int numberOfSteps)
throws NoMatchingTransitionConditionFoundException,
MaximumIterationsReachedException
startStateID - startStateContext - numberOfSteps - the number of transitions to be executed.
NoMatchingTransitionConditionFoundException
MaximumIterationsReachedExceptionpublic void registerGraphListener(GraphListener graphListener)
public boolean unregisterGraphListener(GraphListener graphListener)
graphListener - to be removed.
public long getMaximumLoops()
public void setMaximumLoops(long maximumLoops)
public int getLastVisitedStatesHistorySize()
public void setLastVisitedStatesHistorySize(int lastVisitedStatesHistorySize)
public java.util.List getGraphListeners()
type: GraphListener
public java.util.List getLastVisitedStatesHistoryList()
element type: ProcessableState
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||