Class StepState
java.lang.Object
org.springframework.batch.core.job.flow.support.state.AbstractState
org.springframework.batch.core.job.flow.support.state.StepState
- All Implemented Interfaces:
State
,StepHolder
,StepLocator
- Since:
- 2.0
- Author:
- Dave Syer, Michael Minella, Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetStep()
handle
(FlowExecutor executor) Handle some business or processing logic and return a status that can be used to drive a flow to the nextState
.boolean
Inquire as to whether aState
is an end state.Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState
getName, toString
-
Constructor Details
-
StepState
- Parameters:
step
- the step that will be executed
-
StepState
- Parameters:
name
- for the step that will be executedstep
- the step that will be executed
-
-
Method Details
-
handle
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 nextState
. The status can be any string, but special meaning is assigned to the static constants inFlowExecution
. The context can be used by implementations to do whatever they need to do. The same context will be passed to allState
instances, so implementations should be careful that the context is thread-safe, or used in a thread-safe manner.- Specified by:
handle
in interfaceState
- Specified by:
handle
in classAbstractState
- Parameters:
executor
- the context passed in by the caller- Returns:
- a status for the execution
- Throws:
Exception
- if anything goes wrong
-
getStep
- Specified by:
getStep
in interfaceStepHolder
-
isEndState
public boolean isEndState()Description copied from interface:State
Inquire as to whether aState
is an end state. Implementations should return false if processing can continue, even if that would require a restart.- Specified by:
isEndState
in interfaceState
- Returns:
- true if this
State
is the end of processing
-
getStepNames
- Specified by:
getStepNames
in interfaceStepLocator
-
getStep
- Specified by:
getStep
in interfaceStepLocator
- Throws:
NoSuchStepException
-