org.springframework.batch.core
Class BatchStatus

java.lang.Object
  extended by 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

Field Summary
static BatchStatus COMPLETED
           
static BatchStatus FAILED
           
static BatchStatus STARTED
           
static BatchStatus STARTING
           
static BatchStatus STOPPED
           
static BatchStatus STOPPING
           
static BatchStatus UNKNOWN
           
 
Method Summary
static BatchStatus getStatus(String statusAsString)
          Given a string representation of a status, return the appropriate BatchStatus.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Method Detail

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.