org.springframework.batch.core.job.flow.support.state
Class EndState

java.lang.Object
  extended by org.springframework.batch.core.job.flow.support.state.AbstractState
      extended by org.springframework.batch.core.job.flow.support.state.EndState
All Implemented Interfaces:
State

public class EndState
extends AbstractState

State implementation for ending a job if it is in progress and continuing if just starting.

Since:
2.0
Author:
Dave Syer

Constructor Summary
EndState(FlowExecutionStatus status, String name)
           
EndState(FlowExecutionStatus status, String code, String name)
           
EndState(FlowExecutionStatus status, String code, String name, boolean abandon)
           
 
Method Summary
 FlowExecutionStatus handle(FlowExecutor executor)
          Return the FlowExecutionStatus stored.
 boolean isEndState()
          Inquire as to whether a State is an end state.
 String toString()
           
 
Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EndState

public EndState(FlowExecutionStatus status,
                String name)
Parameters:
status - The FlowExecutionStatus to end with
name - The name of the state

EndState

public EndState(FlowExecutionStatus status,
                String code,
                String name)
Parameters:
status - The FlowExecutionStatus to end with
name - The name of the state

EndState

public EndState(FlowExecutionStatus status,
                String code,
                String name,
                boolean abandon)
Parameters:
status - The FlowExecutionStatus to end with
name - The name of the state
abandon - flag to indicate that previous step execution can be marked as abandoned (if there is one)
Method Detail

handle

public FlowExecutionStatus handle(FlowExecutor executor)
                           throws Exception
Return the FlowExecutionStatus stored.

Specified by:
handle in interface State
Specified by:
handle in class AbstractState
Parameters:
executor - the context passed in by the caller
Returns:
a status for the execution
Throws:
Exception - if anything goes wrong
See Also:
State.handle(FlowExecutor)

isEndState

public boolean isEndState()
Description copied from interface: State
Inquire as to whether a State is an end state. Implementations should return false if processing can continue, even if that would require a restart.

Returns:
true if this State is the end of processing

toString

public String toString()
Overrides:
toString in class AbstractState


Copyright © 2013 SpringSource. All Rights Reserved.