S
- the type of stateE
- the type of eventpublic abstract class AbstractPseudoState<S,E> extends java.lang.Object implements PseudoState<S,E>
PseudoState
.Constructor and Description |
---|
AbstractPseudoState(PseudoStateKind kind)
Instantiates a new abstract pseudo state.
|
Modifier and Type | Method and Description |
---|---|
void |
addPseudoStateListener(PseudoStateListener<S,E> listener)
Registers a new
PseudoStateListener . |
State<S,E> |
entry(StateContext<S,E> context)
Initiate an entry sequence for the state and return a next
state where state machine should go.
|
void |
exit(StateContext<S,E> context)
Initiate an exit sequence for the state.
|
PseudoStateKind |
getKind()
Gets the pseudostate kind.
|
protected void |
notifyContext(PseudoStateContext<S,E> context)
Notify all
PseudoStateListener s of a new context. |
void |
setPseudoStateListeners(java.util.List<PseudoStateListener<S,E>> listeners)
Registers a new
PseudoStateListener s. |
public AbstractPseudoState(PseudoStateKind kind)
kind
- the kindpublic PseudoStateKind getKind()
PseudoState
getKind
in interface PseudoState<S,E>
public State<S,E> entry(StateContext<S,E> context)
PseudoState
entry
in interface PseudoState<S,E>
context
- the contextpublic void exit(StateContext<S,E> context)
PseudoState
exit
in interface PseudoState<S,E>
context
- the contextpublic void addPseudoStateListener(PseudoStateListener<S,E> listener)
PseudoState
PseudoStateListener
.addPseudoStateListener
in interface PseudoState<S,E>
listener
- the listenerpublic void setPseudoStateListeners(java.util.List<PseudoStateListener<S,E>> listeners)
PseudoState
PseudoStateListener
s. Clears all
existing listeners.setPseudoStateListeners
in interface PseudoState<S,E>
listeners
- the listenersprotected void notifyContext(PseudoStateContext<S,E> context)
PseudoStateListener
s of a new context.context
- the new context