org.springframework.batch.core
Class BatchStatus
java.lang.Object
org.springframework.batch.core.BatchStatus
- All Implemented Interfaces:
- Serializable
public class BatchStatus
- extends Object
- implements Serializable
Typesafe enumeration representing the status of an artifact within the batch environment. See Effective Java
Programming by Joshua Bloch for more details on the pattern used.
A BatchStatus can be safely serialized, however, it should be noted that the pattern can break down if different
class loaders load the enumeration.
This class is immutable and therefore thread-safe.
- Author:
- Lucas Ward, Greg Kick
- See Also:
- Serialized Form
COMPLETED
public static final BatchStatus COMPLETED
STARTED
public static final BatchStatus STARTED
STARTING
public static final BatchStatus STARTING
FAILED
public static final BatchStatus FAILED
STOPPING
public static final BatchStatus STOPPING
STOPPED
public static final BatchStatus STOPPED
UNKNOWN
public static final BatchStatus UNKNOWN
toString
public String toString()
- Overrides:
toString
in class Object
getStatus
public static BatchStatus getStatus(String statusAsString)
- Given a string representation of a status, return the appropriate BatchStatus.
- Parameters:
statusAsString
- string representation of a status
- Returns:
- a valid BatchStatus or null if the input is null
- Throws:
IllegalArgumentException
- if no status matches provided string.
Copyright © 2009 SpringSource. All Rights Reserved.