org.ogf.saga.task
Enum State

java.lang.Object
  extended by java.lang.Enum<State>
      extended by org.ogf.saga.task.State
All Implemented Interfaces:
Serializable, Comparable<State>

public enum State
extends Enum<State>

This enumeration type describes the possible states of a task. Also includes the states of the job class, since enumerations cannot be extended.


Enum Constant Summary
CANCELED
          The task has been cancelled, that is, Task.cancel() has been called on it.
DONE
          The task has finished successfully.
FAILED
          The task has finished unsuccessfully.
NEW
          Describes a newly constructed task instance which has not yet run.
RUNNING
          The Task.run() method has been invoked on the task, either explicitly or implicitly.
SUSPENDED
          This is actually a job state, but is included here because enumerations cannot be extended.
 
Method Summary
 int getValue()
          Returns the integer value of this enumeration literal.
static State valueOf(String name)
          Returns the enum constant of this type with the specified name.
static State[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NEW

public static final State NEW
Describes a newly constructed task instance which has not yet run.


RUNNING

public static final State RUNNING
The Task.run() method has been invoked on the task, either explicitly or implicitly.


DONE

public static final State DONE
The task has finished successfully. This state is final.


CANCELED

public static final State CANCELED
The task has been cancelled, that is, Task.cancel() has been called on it. This state is final.


FAILED

public static final State FAILED
The task has finished unsuccessfully. This state is final.


SUSPENDED

public static final State SUSPENDED
This is actually a job state, but is included here because enumerations cannot be extended. It indicates that the job instance has been suspended.

Method Detail

values

public static State[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (State c : State.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static State valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public int getValue()
Returns the integer value of this enumeration literal.

Returns:
the value.


Copyright © 2014 Open Grid Forum. All rights reserved.