Class FlowExecutionStatus
- java.lang.Object
- org.springframework.batch.core.job.flow.FlowExecutionStatus
- All Implemented Interfaces:
java.lang.Comparable<FlowExecutionStatus>
public class FlowExecutionStatus extends java.lang.Object implements java.lang.Comparable<FlowExecutionStatus>
Represents the status ofFlowExecution
.- Since:
- 2.0
- Author:
- Dan Garrette, Dave Syer
Field Summary
Fields Modifier and Type Field Description static FlowExecutionStatus
COMPLETED
Special well-known status value.static FlowExecutionStatus
FAILED
Special well-known status value.static FlowExecutionStatus
STOPPED
Special well-known status value.static FlowExecutionStatus
UNKNOWN
Special well-known status value.
Constructor Summary
Constructors Constructor Description FlowExecutionStatus(java.lang.String status)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FlowExecutionStatus other)
Create an ordering onFlowExecutionStatus
instances by comparing their statuses.boolean
equals(java.lang.Object object)
Check the equality of the statuses.java.lang.String
getName()
int
hashCode()
boolean
isEnd()
boolean
isFail()
boolean
isStop()
java.lang.String
toString()
Field Detail
COMPLETED
public static final FlowExecutionStatus COMPLETED
Special well-known status value.
STOPPED
public static final FlowExecutionStatus STOPPED
Special well-known status value.
FAILED
public static final FlowExecutionStatus FAILED
Special well-known status value.
UNKNOWN
public static final FlowExecutionStatus UNKNOWN
Special well-known status value.
Method Detail
isStop
public boolean isStop()
- Returns:
- true if the status starts with "STOPPED"
isFail
public boolean isFail()
- Returns:
- true if the status starts with "FAILED"
isEnd
public boolean isEnd()
- Returns:
- true if this status represents the end of a flow
compareTo
public int compareTo(FlowExecutionStatus other)
Create an ordering onFlowExecutionStatus
instances by comparing their statuses.- Specified by:
compareTo
in interfacejava.lang.Comparable<FlowExecutionStatus>
- Parameters:
other
- instance ofFlowExecutionStatus
to compare this instance with.- Returns:
- negative, zero or positive as per the contract
- See Also:
Comparable.compareTo(Object)
equals
public boolean equals(java.lang.Object object)
Check the equality of the statuses.- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
getName
public java.lang.String getName()
- Returns:
- the name of this status