uk.ac.starlink.vo
Enum UwsStage

java.lang.Object
  extended by java.lang.Enum<UwsStage>
      extended by uk.ac.starlink.vo.UwsStage
All Implemented Interfaces:
Serializable, Comparable<UwsStage>

public enum UwsStage
extends Enum<UwsStage>

Enum for categorising the stage of UWS processing. This effectively subdivides the various phases defined by UWS.

Since:
17 Feb 2011
Author:
Mark Taylor

Enum Constant Summary
FINISHED
          Job has finished successfully or otherwise; will not progress further.
ILLEGAL
          Not a defined phase string.
RUNNING
          Job is progressing; should reach FINISHED stage eventually.
UNKNOWN
          UNKNOWN phase; may change in future.
UNSTARTED
          Job will not complete of its own accord; need to post RUN phase.
 
Method Summary
static UwsStage forPhase(String phase)
          Returns the stage corresponding to a given UWS phase.
 Collection<String> getPhaseList()
          Returns the phases which correspond to this stage.
static UwsStage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UwsStage[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNSTARTED

public static final UwsStage UNSTARTED
Job will not complete of its own accord; need to post RUN phase.


RUNNING

public static final UwsStage RUNNING
Job is progressing; should reach FINISHED stage eventually.


FINISHED

public static final UwsStage FINISHED
Job has finished successfully or otherwise; will not progress further.


UNKNOWN

public static final UwsStage UNKNOWN
UNKNOWN phase; may change in future.


ILLEGAL

public static final UwsStage ILLEGAL
Not a defined phase string.

Method Detail

values

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

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

valueOf

public static UwsStage 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

getPhaseList

public Collection<String> getPhaseList()
Returns the phases which correspond to this stage.

Returns:
unmodifiable collection of defined phase strings

forPhase

public static UwsStage forPhase(String phase)
Returns the stage corresponding to a given UWS phase. If the given phase is not one defined by UWS, ILLEGAL is returned.

Parameters:
phase - UWS phase string
Returns:
corresponding stage


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.