Package cn.sliew.milky.common.state
Interface State<T extends StateMachine>
-
public interface State<T extends StateMachine>This interface must be extended by any class that should implement a certain state in the state machine.https://github.com/RestComm/jdiameter/blob/master/core/jdiameter/api/src/main/java/org/jdiameter/api/app/State.java
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidentryAction()Action that should be taken each time this state is enteredvoidexitAction()Action that should be taken each time this state is exitedbooleanprocessEvent(T fsm, StateEvent event)This method processed received event.
-
-
-
Method Detail
-
entryAction
void entryAction()
Action that should be taken each time this state is entered
-
exitAction
void exitAction()
Action that should be taken each time this state is exited
-
processEvent
boolean processEvent(T fsm, StateEvent event)
This method processed received event.- Parameters:
fsm- the state machineevent- the event to process.- Returns:
- true if event is processed
-
-