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,
String name) |
EndState(FlowExecutionStatus status,
String code,
String name) |
EndState(FlowExecutionStatus status,
String code,
String name,
boolean abandon) |
Modifier and Type | Method and Description |
---|---|
FlowExecutionStatus |
handle(FlowExecutor executor)
Return the
FlowExecutionStatus stored. |
boolean |
isEndState()
Inquire as to whether a
State is an end state. |
String |
toString() |
getName
public EndState(FlowExecutionStatus status, String name)
status
- The FlowExecutionStatus
to end withname
- The name of the statepublic EndState(FlowExecutionStatus status, String code, String name)
status
- The FlowExecutionStatus
to end withname
- The name of the statepublic EndState(FlowExecutionStatus status, String code, 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)public FlowExecutionStatus handle(FlowExecutor executor) throws Exception
FlowExecutionStatus
stored.handle
in interface State
handle
in class AbstractState
executor
- the context passed in by the callerException
- if anything goes wrongState.handle(FlowExecutor)
public 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 String toString()
toString
in class AbstractState
Copyright © 2014 Pivotal. All rights reserved.