public class StepState extends AbstractState implements StepLocator, StepHolder
Constructor and Description |
---|
StepState(Step step) |
StepState(java.lang.String name,
Step step) |
Modifier and Type | Method and Description |
---|---|
Step |
getStep() |
Step |
getStep(java.lang.String stepName) |
java.util.Collection<java.lang.String> |
getStepNames() |
FlowExecutionStatus |
handle(FlowExecutor executor)
Handle some business or processing logic and return a status that can be
used to drive a flow to the next
State . |
boolean |
isEndState()
Inquire as to whether a
State is an end state. |
getName, toString
public StepState(Step step)
step
- the step that will be executedpublic StepState(java.lang.String name, Step step)
name
- for the step that will be executedstep
- the step that will be executedpublic FlowExecutionStatus handle(FlowExecutor executor) throws java.lang.Exception
State
State
. The status can be any
string, but special meaning is assigned to the static constants in
FlowExecution
. The context can be used by implementations to do
whatever they need to do. The same context will be passed to all
State
instances, so implementations should be careful that the
context is thread-safe, or used in a thread-safe manner.handle
in interface State
handle
in class AbstractState
executor
- the context passed in by the callerjava.lang.Exception
- if anything goes wrongpublic Step getStep()
getStep
in interface StepHolder
public boolean isEndState()
State
State
is an end state. Implementations
should return false if processing can continue, even if that would
require a restart.isEndState
in interface State
State
is the end of processingpublic java.util.Collection<java.lang.String> getStepNames()
getStepNames
in interface StepLocator
public Step getStep(java.lang.String stepName) throws NoSuchStepException
getStep
in interface StepLocator
NoSuchStepException