Class JsrEndState
- java.lang.Object
- org.springframework.batch.core.job.flow.support.state.AbstractState
- org.springframework.batch.core.job.flow.support.state.EndState
- org.springframework.batch.core.jsr.job.flow.support.state.JsrEndState
Constructor Summary
Constructors Constructor Description JsrEndState(FlowExecutionStatus status, java.lang.String name)
JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name)
JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, boolean abandon)
JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, java.lang.String restart, boolean abandon, JobRepository jobRepository)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowExecutionStatus
handle(FlowExecutor executor)
Return theFlowExecutionStatus
stored.protected void
setExitStatus(FlowExecutor executor, java.lang.String code)
Performs any logic to update the exit status for the current flow.Methods inherited from class org.springframework.batch.core.job.flow.support.state.EndState
getCode, getStatus, isAbandon, isEndState, toString
Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState
getName
Constructor Detail
JsrEndState
public JsrEndState(FlowExecutionStatus status, java.lang.String name)
- Parameters:
status
- TheFlowExecutionStatus
to end withname
- The name of the state
JsrEndState
public JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name)
- Parameters:
status
- TheFlowExecutionStatus
to end withname
- The name of the statecode
- the exit status.
JsrEndState
public JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, boolean abandon)
- Parameters:
status
- TheFlowExecutionStatus
to end withname
- The name of the stateabandon
- flag to indicate that previous step execution can be marked as abandoned (if there is one)code
- the exit status.
JsrEndState
public JsrEndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, java.lang.String restart, boolean abandon, JobRepository jobRepository)
Method Detail
handle
public FlowExecutionStatus handle(FlowExecutor executor) throws java.lang.Exception
Description copied from class:EndState
Return theFlowExecutionStatus
stored.- Specified by:
handle
in interfaceState
- Overrides:
handle
in classEndState
- Parameters:
executor
- the context passed in by the caller- Returns:
- a status for the execution
- Throws:
java.lang.Exception
- if anything goes wrong- See Also:
State.handle(FlowExecutor)
setExitStatus
protected void setExitStatus(FlowExecutor executor, java.lang.String code)
Description copied from class:EndState
Performs any logic to update the exit status for the current flow.- Overrides:
setExitStatus
in classEndState
- Parameters:
executor
-FlowExecutor
for the current flowcode
- The exit status to save