Interface StateMachine<S,​E,​C>

  • Type Parameters:
    S - the type of state
    E - the type of event
    C - the user defined context
    All Superinterfaces:
    Visitable
    All Known Implementing Classes:
    StateMachineImpl

    public interface StateMachine<S,​E,​C>
    extends Visitable
    StateMachine
    Author:
    Frank Zhang
    • Method Detail

      • fireEvent

        S fireEvent​(S sourceState,
                    E event,
                    C ctx)
        Send an event E to the state machine.
        Parameters:
        sourceState - the source state
        event - the event to send
        ctx - the user defined context
        Returns:
        the target state
      • getMachineId

        String getMachineId()
        MachineId is the identifier for a State Machine
        Returns:
      • showStateMachine

        void showStateMachine()
        Use visitor pattern to display the structure of the state machine
      • generatePlantUML

        String generatePlantUML()