Class EndState

  • All Implemented Interfaces:
    State
    Direct Known Subclasses:
    JsrEndState

    public class EndState
    extends AbstractState
    State implementation for ending a job if it is in progress and continuing if just starting.
    Since:
    2.0
    Author:
    Dave Syer
    • Constructor Detail

      • EndState

        public EndState​(FlowExecutionStatus status,
                        java.lang.String code,
                        java.lang.String name)
        Parameters:
        status - The FlowExecutionStatus to end with
        name - The name of the state
        code - The exit status to save
      • EndState

        public EndState​(FlowExecutionStatus status,
                        java.lang.String code,
                        java.lang.String name,
                        boolean abandon)
        Parameters:
        status - The FlowExecutionStatus to end with
        name - The name of the state
        code - The exit status to save
        abandon - flag to indicate that previous step execution can be marked as abandoned (if there is one)
    • Method Detail

      • isAbandon

        protected boolean isAbandon()
      • getCode

        protected java.lang.String getCode()
      • setExitStatus

        protected void setExitStatus​(FlowExecutor executor,
                                     java.lang.String code)
        Performs any logic to update the exit status for the current flow.
        Parameters:
        executor - FlowExecutor for the current flow
        code - The exit status to save
      • isEndState

        public boolean isEndState()
        Description copied from interface: State
        Inquire as to whether a State is an end state. Implementations should return false if processing can continue, even if that would require a restart.
        Returns:
        true if this State is the end of processing