Interface Action

    • Method Detail

      • check

        ActionStatus check​(ActionState state)
        It checks this action.

        When ActionStatus.READY or ActionStatus.CANCELED are final states.

        This method should be thread safe and idempotent since it can be invoked multiple times by multiples threads.

        Parameters:
        state - the current state.
        Returns:
        the status of this action.
      • addListener

        default void addListener​(ActionListener listener)
        Adds a listener to be invoked when this action is ready or canceled.
        Parameters:
        listener - the ActionListener to add.
      • onException

        default void onException​(ActionState state)
        Invoked when an exception occurs while processing the command.
        Parameters:
        state - the current state.
      • onFinally

        default void onFinally​(ActionState state)
        Invoked always after the command is executed.
        Parameters:
        state - the current state.\