类 EndState
- java.lang.Object
- org.springframework.batch.core.job.flow.support.state.AbstractState
- org.springframework.batch.core.job.flow.support.state.EndState
- 所有已实现的接口:
State
- 直接已知子类:
JsrEndState
public class EndState extends AbstractState
State
implementation for ending a job if it is in progress and continuing if just starting.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 EndState(FlowExecutionStatus status, java.lang.String name)
EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name)
EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, boolean abandon)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected java.lang.String
getCode()
protected FlowExecutionStatus
getStatus()
FlowExecutionStatus
handle(FlowExecutor executor)
Return theFlowExecutionStatus
stored.protected boolean
isAbandon()
boolean
isEndState()
Inquire as to whether aState
is an end state.protected void
setExitStatus(FlowExecutor executor, java.lang.String code)
Performs any logic to update the exit status for the current flow.java.lang.String
toString()
从类继承的方法 org.springframework.batch.core.job.flow.support.state.AbstractState
getName
构造器详细资料
EndState
public EndState(FlowExecutionStatus status, java.lang.String name)
- 参数:
status
- TheFlowExecutionStatus
to end withname
- The name of the state
EndState
public EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name)
- 参数:
status
- TheFlowExecutionStatus
to end withname
- The name of the statecode
- The exit status to save
EndState
public EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, boolean abandon)
- 参数:
status
- TheFlowExecutionStatus
to 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)
方法详细资料
getStatus
protected FlowExecutionStatus getStatus()
isAbandon
protected boolean isAbandon()
getCode
protected java.lang.String getCode()
handle
public FlowExecutionStatus handle(FlowExecutor executor) throws java.lang.Exception
Return theFlowExecutionStatus
stored.- 指定者:
handle
在接口中State
- 指定者:
handle
在类中AbstractState
- 参数:
executor
- the context passed in by the caller- 返回:
- a status for the execution
- 抛出:
java.lang.Exception
- if anything goes wrong- 另请参阅:
State.handle(FlowExecutor)
setExitStatus
protected void setExitStatus(FlowExecutor executor, java.lang.String code)
Performs any logic to update the exit status for the current flow.- 参数:
executor
-FlowExecutor
for the current flowcode
- The exit status to save
isEndState
public boolean isEndState()
从接口复制的说明: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.- 返回:
- true if this
State
is the end of processing
toString
public java.lang.String toString()
- 覆盖:
toString
在类中AbstractState