public interface StateMachine
| Modifier and Type | Method and Description |
|---|---|
void |
addStateChangeNotification(StateChangeListener listener)
Add a new state change listener
|
<E> E |
getState(Class<E> stateType)
Get the current state
|
boolean |
handleEvent(StateEvent event)
Handle an event in the current state.
|
void |
removeStateChangeNotification(StateChangeListener listener)
Remove a state change listener
|
void addStateChangeNotification(StateChangeListener listener)
listener - a reference to the listener that will get information about state changes.void removeStateChangeNotification(StateChangeListener listener)
listener - a reference to the listener that will get information about state changes.boolean handleEvent(StateEvent event) throws InternalException, OverloadException
event - processing eventOverloadException - if queue of state mashine is fullInternalException - if FSM has internal error<E> E getState(Class<E> stateType)
stateType - type of stateCopyright © 2016. All Rights Reserved.