org.springframework.batch.core.jsr.job.flow.support.state

## Class JsrStepState

- java.lang.Object
- - org.springframework.batch.core.job.flow.support.state.AbstractState
  - - org.springframework.batch.core.job.flow.support.state.StepState
    - - org.springframework.batch.core.jsr.job.flow.support.state.JsrStepState

- All Implemented Interfaces:
    State, StepHolder, StepLocator

      public class JsrStepState
      extends StepState

  Extends `StepState` to persist what the last step that was executed was (used in Decisions and restarts).
  Since:
    3.0
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsrStepState(Step step)`
    `JsrStepState(java.lang.String name, Step step)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FlowExecutionStatus` | `handle(FlowExecutor executor)` Handle some business or processing logic and return a status that can be used to drive a flow to the next `State`.

    - ### Methods inherited from class org.springframework.batch.core.job.flow.support.state.StepState

      `getStep, getStep, getStepNames, isEndState`

    - ### Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState

      `getName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JsrStepState

          public JsrStepState(Step step)

      Parameters:
        `step` - the step that will be executed

    - #### JsrStepState

          public JsrStepState(java.lang.String name,
                              Step step)

      Parameters:
        `name` - for the step that will be executed
        `step` - the step that will be executed

  - ### Method Detail

    - #### handle

          public FlowExecutionStatus handle(FlowExecutor executor)
                                     throws java.lang.Exception

      Description copied from interface: `State`
      Handle some business or processing logic and return a status that can be used to drive a flow to the next `State`. The status can be any string, but special meaning is assigned to the static constants in `FlowExecution`. The context can be used by implementations to do whatever they need to do. The same context will be passed to all `State` instances, so implementations should be careful that the context is thread-safe, or used in a thread-safe manner.
      Specified by:
        `handle` in interface `State`
      Overrides:
        `handle` in class `StepState`
      Parameters:
        `executor` - the context passed in by the caller
      Returns:
        a status for the execution
      Throws:
        `java.lang.Exception` - if anything goes wrong