public class SplitState extends AbstractState implements FlowHolder
Constructor and Description |
---|
SplitState(java.util.Collection<Flow> flows,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected FlowExecutionStatus |
doAggregation(java.util.Collection<FlowExecution> results,
FlowExecutor executor) |
java.util.Collection<Flow> |
getFlows() |
FlowExecutionStatus |
handle(FlowExecutor executor)
Execute the flows in parallel by passing them to the
TaskExecutor
and wait for all of them to finish before proceeding. |
boolean |
isEndState()
Inquire as to whether a
State is an end state. |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Public setter for the taskExecutor.
|
getName, toString
public SplitState(java.util.Collection<Flow> flows, java.lang.String name)
name
- public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
taskExecutor
- the taskExecutor to setpublic java.util.Collection<Flow> getFlows()
getFlows
in interface FlowHolder
public FlowExecutionStatus handle(FlowExecutor executor) throws java.lang.Exception
TaskExecutor
and wait for all of them to finish before proceeding.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 FlowExecutionStatus doAggregation(java.util.Collection<FlowExecution> results, FlowExecutor executor)
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 processing