public class EndState extends AbstractState
State
implementation for ending a job if it is in progress and
continuing if just starting.Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCode() |
protected FlowExecutionStatus |
getStatus() |
FlowExecutionStatus |
handle(FlowExecutor executor)
Return the
FlowExecutionStatus stored. |
protected boolean |
isAbandon() |
boolean |
isEndState()
Inquire as to whether a
State 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() |
getName
public EndState(FlowExecutionStatus status, java.lang.String name)
status
- The FlowExecutionStatus
to end withname
- The name of the statepublic EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name)
status
- The FlowExecutionStatus
to end withname
- The name of the statepublic EndState(FlowExecutionStatus status, java.lang.String code, java.lang.String name, boolean abandon)
status
- The FlowExecutionStatus
to end withname
- The name of the stateabandon
- flag to indicate that previous step execution can be
marked as abandoned (if there is one)protected FlowExecutionStatus getStatus()
protected boolean isAbandon()
protected java.lang.String getCode()
public FlowExecutionStatus handle(FlowExecutor executor) throws java.lang.Exception
FlowExecutionStatus
stored.handle
in interface State
handle
in class AbstractState
executor
- the context passed in by the callerjava.lang.Exception
- if anything goes wrongState.handle(FlowExecutor)
protected void setExitStatus(FlowExecutor executor, java.lang.String code)
executor
- FlowExecutor
for the current flowcode
- The exit status to savepublic boolean isEndState()
State
State
is an end state. Implementations
should return false if processing can continue, even if that would
require a restart.State
is the end of processingpublic java.lang.String toString()
toString
in class AbstractState