|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.echarts.Machine org.echarts.StateMachine org.echarts.TransitionMachine
public abstract class TransitionMachine
Abstract class representing common elements of a StateMachine that define transitions (and-machines and or-machines).
Field Summary |
---|
Fields inherited from class org.echarts.Machine |
---|
ANY_CONFIG, BASIC_CONFIG, DEEP_HISTORY_CONFIG, DEFAULT_INITIAL_CONFIG, NEW_CONFIG, serialVersionUID, TERMINAL_CONFIG, VARIABLE_CONFIG |
Constructor Summary | |
---|---|
TransitionMachine(State[] states,
MachineMessageTransitions[] messageTransitions,
MachineMessagelessTransitions[] messagelessTransitions,
java.lang.String machineName,
Machine parentMachine,
int machineIndex,
MachineCode machineCode)
|
Method Summary | |
---|---|
static void |
addMessagelessTransition(MachineMessagelessTransitions[] currentTransitions,
MessagelessTransition transitionToAdd,
int sourceStateIndex)
|
static void |
addMessageTransition(MachineMessageTransitions[] currentTransitions,
MessageTransition transitionToAdd,
int sourceStateIndex)
|
java.lang.String |
globalStateString()
Returns string representing global state of this machine. |
java.lang.String |
globalStateString(StateConfiguration config,
TransitionMachine firedMachine)
Returns string representing global state of this machine that was updated by the specified target configuration. |
static MachineMessagelessTransitions[] |
initializeMessagelessTransitions(MachineMessagelessTransitions[] transitionsList)
|
static MachineMessageTransitions[] |
initializeMessageTransitions(MachineMessageTransitions[] transitionsList)
|
boolean |
initializeRoot()
Initializes root machine. |
java.lang.String |
localStateString()
Returns formatted image of machine's local state. |
java.lang.String |
localStateString(StateConfiguration config,
TransitionMachine firedMachine)
Returns formated image of local machine state that has changed as a result of firing transition with specified relative target state configuration. |
void |
removePort(ExternalPort port)
Removes machine's external port acceptor from port. |
void |
run()
Run machine firing as many transitions as possible. |
boolean |
run(LocalPort port,
java.lang.Object message)
Use specified port and message as stimulus to fire as many transitions as possible without blocking. |
boolean |
runNoQueueing(LocalPort port,
java.lang.Object message)
Use specified port and message as stimulus to fire as many transitions as possible without blocking. |
Methods inherited from class org.echarts.StateMachine |
---|
setMachineDebugging, setMachineMonitor, setMachineMonitoring |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransitionMachine(State[] states, MachineMessageTransitions[] messageTransitions, MachineMessagelessTransitions[] messagelessTransitions, java.lang.String machineName, Machine parentMachine, int machineIndex, MachineCode machineCode) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public static final MachineMessageTransitions[] initializeMessageTransitions(MachineMessageTransitions[] transitionsList)
public static final MachineMessagelessTransitions[] initializeMessagelessTransitions(MachineMessagelessTransitions[] transitionsList)
public static final void addMessagelessTransition(MachineMessagelessTransitions[] currentTransitions, MessagelessTransition transitionToAdd, int sourceStateIndex)
public static final void addMessageTransition(MachineMessageTransitions[] currentTransitions, MessageTransition transitionToAdd, int sourceStateIndex)
public final void run() throws java.lang.Exception
java.lang.Exception
public final boolean run(LocalPort port, java.lang.Object message) throws java.lang.Exception
java.lang.Exception
public final boolean runNoQueueing(LocalPort port, java.lang.Object message) throws java.lang.Exception
java.lang.Exception
public final boolean initializeRoot() throws java.lang.Exception
java.lang.Exception
public final void removePort(ExternalPort port)
public final java.lang.String globalStateString(StateConfiguration config, TransitionMachine firedMachine) throws java.lang.Exception
globalStateString
in class Machine
java.lang.Exception
public final java.lang.String globalStateString()
globalStateString
in class Machine
public final java.lang.String localStateString(StateConfiguration config, TransitionMachine firedMachine) throws java.lang.Exception
localStateString
in class Machine
java.lang.Exception
public final java.lang.String localStateString()
localStateString
in class Machine
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |