org.springframework.batch.core.job.flow.support.state
Class AbstractState
java.lang.Object
org.springframework.batch.core.job.flow.support.state.AbstractState
- All Implemented Interfaces:
- State
- Direct Known Subclasses:
- DecisionState, EndState, FlowState, SplitState, StepState
public abstract class AbstractState
- extends Object
- implements State
- Since:
- 2.0
- Author:
- Dave Syer
Methods inherited from interface org.springframework.batch.core.job.flow.State |
isEndState |
AbstractState
public AbstractState(String name)
getName
public String getName()
- Description copied from interface:
State
- The name of the state. Should be unique within a flow.
- Specified by:
getName
in interface State
- Returns:
- the name of this state
toString
public String toString()
- Overrides:
toString
in class Object
handle
public abstract FlowExecutionStatus handle(FlowExecutor executor)
throws Exception
- Description copied from interface:
State
- Handle some business or processing logic and return a status that can be
used to drive a flow to the next
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.
- Specified by:
handle
in interface State
- Parameters:
executor
- the context passed in by the caller
- Returns:
- a status for the execution
- Throws:
Exception
- if anything goes wrong
Copyright © 2013 SpringSource. All Rights Reserved.