Class EndState
java.lang.Object
org.springframework.batch.core.job.flow.support.state.AbstractState
org.springframework.batch.core.job.flow.support.state.EndState
- All Implemented Interfaces:
State
State implementation for ending a job if it is in progress and continuing if
just starting.- Since:
- 2.0
- Author:
- Dave Syer
-
Constructor Summary
ConstructorsConstructorDescriptionEndState(FlowExecutionStatus status, String name) EndState(FlowExecutionStatus status, String code, String name) EndState(FlowExecutionStatus status, String code, String name, boolean abandon) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetCode()protected FlowExecutionStatushandle(FlowExecutor executor) Return theFlowExecutionStatusstored.protected booleanbooleanInquire as to whether aStateis an end state.protected voidsetExitStatus(FlowExecutor executor, String code) Performs any logic to update the exit status for the current flow.toString()Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState
getName
-
Constructor Details
-
EndState
- Parameters:
status- TheFlowExecutionStatusto end withname- The name of the state
-
EndState
- Parameters:
status- TheFlowExecutionStatusto end withname- The name of the statecode- The exit status to save
-
EndState
- Parameters:
status- TheFlowExecutionStatusto end withname- The name of the statecode- The exit status to saveabandon- flag to indicate that previous step execution can be marked as abandoned (if there is one)
-
-
Method Details
-
getStatus
-
isAbandon
protected boolean isAbandon() -
getCode
-
handle
Return theFlowExecutionStatusstored.- Specified by:
handlein interfaceState- Specified by:
handlein classAbstractState- Parameters:
executor- the context passed in by the caller- Returns:
- a status for the execution
- Throws:
Exception- if anything goes wrong- See Also:
-
setExitStatus
Performs any logic to update the exit status for the current flow.- Parameters:
executor-FlowExecutorfor the current flowcode- The exit status to save
-
isEndState
public boolean isEndState()Description copied from interface:StateInquire as to whether aStateis an end state. Implementations should return false if processing can continue, even if that would require a restart.- Returns:
- true if this
Stateis the end of processing
-
toString
- Overrides:
toStringin classAbstractState
-