org.opentox.toxotis.core.component
Enum Task.Status

java.lang.Object
  extended by java.lang.Enum<Task.Status>
      extended by org.opentox.toxotis.core.component.Task.Status
All Implemented Interfaces:
Serializable, Comparable<Task.Status>
Enclosing class:
Task

public static enum Task.Status
extends Enum<Task.Status>

Status of the task revealing information about the asynchronous job with which the task is related and runs on a server.


Enum Constant Summary
CANCELLED
          The task is cancelled by the User.
COMPLETED
          The task has completed execution successfully.
ERROR
          Task execution was interrupted due to some error related with the asynchronous job, either due to a bad request by the client, an internal server error or an error related to a third remote service.
QUEUED
          The task is created and put in an execution queue but is not running yet.
REJECTED
          Due to large load on the server or issues related to A&A or user quota, the task was rejected for execution.
RUNNING
          The task is still Running in the background as an asynchronous job.
 
Method Summary
static Task.Status valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Task.Status[] 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

RUNNING

public static final Task.Status RUNNING
The task is still Running in the background as an asynchronous job. This status means that the task has been submitted to the Execution Pool but has not completed yet.


COMPLETED

public static final Task.Status COMPLETED
The task has completed execution successfully. The result can be found under #resultUri and is accessible via #getResultUri(). The corresponding status is either 200 if the result is the URI of a created resource or 201 if it redirects to some other task (most probably on some other server)


CANCELLED

public static final Task.Status CANCELLED
The task is cancelled by the User.


ERROR

public static final Task.Status ERROR
Task execution was interrupted due to some error related with the asynchronous job, either due to a bad request by the client, an internal server error or an error related to a third remote service. In such a case, the task is accompanied by an error report that provides access to details about the exceptional event.


REJECTED

public static final Task.Status REJECTED
Due to large load on the server or issues related to A&A or user quota, the task was rejected for execution.


QUEUED

public static final Task.Status QUEUED
The task is created and put in an execution queue but is not running yet. HTTP status codes of queueed tasks is 202.

Method Detail

values

public static Task.Status[] 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 (Task.Status c : Task.Status.values())
    System.out.println(c);

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

valueOf

public static Task.Status 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


Copyright © 2011-2012 OpenTox. All Rights Reserved.