java.lang.Object
edu.iicm.xpg.statemachine.PrimitiveStateMachine
- All Implemented Interfaces:
- StateMachine
- public class PrimitiveStateMachine
- extends java.lang.Object
- implements StateMachine
- Version:
- $revision$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
states_
protected java.util.HashMap states_
start_state_
protected State start_state_
current_state_
protected State current_state_
user_data_
protected DataObject user_data_
status_
protected int status_
RUNNING
protected static final int RUNNING
- See Also:
- Constant Field Values
STOPPED
protected static final int STOPPED
- See Also:
- Constant Field Values
INITIALIZED
protected static final int INITIALIZED
- See Also:
- Constant Field Values
PrimitiveStateMachine
public PrimitiveStateMachine()
setStartState
public void setStartState(java.lang.String start_state_id)
throws java.lang.IllegalArgumentException
- Specified by:
setStartState
in interface StateMachine
registerState
public void registerState(State state,
java.lang.String state_id)
throws java.lang.IllegalArgumentException
- Specified by:
registerState
in interface StateMachine
unregisterState
public void unregisterState(java.lang.String state_id)
throws java.lang.IllegalArgumentException
- Specified by:
unregisterState
in interface StateMachine
getRegisteredStates
public java.util.Set getRegisteredStates()
- Specified by:
getRegisteredStates
in interface StateMachine
isStateRegistered
public boolean isStateRegistered(java.lang.String state_id)
throws java.lang.IllegalArgumentException
- Specified by:
isStateRegistered
in interface StateMachine
getCurrentState
public State getCurrentState()
- Specified by:
getCurrentState
in interface StateMachine
getRegisteredTransitions
public java.util.Set getRegisteredTransitions(java.lang.String state_id)
throws java.lang.IllegalArgumentException
- Specified by:
getRegisteredTransitions
in interface StateMachine
registerTransition
public void registerTransition(Input input,
Transition transition,
java.lang.String from_state_id,
java.lang.String to_state_id)
throws java.lang.IllegalArgumentException,
DuplicateStateException
- Specified by:
registerTransition
in interface StateMachine
registerDefaultTransition
public void registerDefaultTransition(Transition transition,
java.lang.String from_state_id,
java.lang.String to_state_id)
throws java.lang.IllegalArgumentException
- Specified by:
registerDefaultTransition
in interface StateMachine
unregisterTransition
public void unregisterTransition(Input input,
java.lang.String from_state_id)
throws java.lang.IllegalArgumentException
- Specified by:
unregisterTransition
in interface StateMachine
setUserDefinedDataObject
public void setUserDefinedDataObject(DataObject data)
- Specified by:
setUserDefinedDataObject
in interface StateMachine
input
public void input(Input input)
throws TransitionException
- Specified by:
input
in interface StateMachine
stopMachine
public void stopMachine()
- Specified by:
stopMachine
in interface StateMachine
initializeMachine
public void initializeMachine()
- Specified by:
initializeMachine
in interface StateMachine