Enum Class ServiceStatus

java.lang.Object
java.lang.Enum<ServiceStatus>
com.caplin.datasrc.enums.ServiceStatus
All Implemented Interfaces:
Serializable, Comparable<ServiceStatus>, Constable

public enum ServiceStatus extends Enum<ServiceStatus>
Enumeration that represents the different service states that a particular object can have.

The getServiceStatusForCode(int) static method should be used to obtain the correct ServiceStatus for a particular status code received from DataSource.

  • Enum Constant Details

    • INFO

      public static final ServiceStatus INFO
      Status information message.
    • OK

      public static final ServiceStatus OK
      The status of the object is OK. All DataSources providing the data for it are up.
    • STALE

      public static final ServiceStatus STALE
      One or more of the required DataSources for this object are down or have sent an explicit stale status message.
    • LIMITED

      public static final ServiceStatus LIMITED
      One or more of the non-required DataSources for this object are down or have sent an explicit stale status message, but all the required DataSources are up.
    • UNKNOWN

      public static final ServiceStatus UNKNOWN
      Indicates that an unknown status code has been supplied. This indicates that there is a compatibility issue between the source of the status message and this DataSource. It is most likely that the source of the status message is using a more recent version of the DataSource protocol.
  • Method Details

    • values

      public static ServiceStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ServiceStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getServiceStatusForCode

      public static ServiceStatus getServiceStatusForCode(int code)
      Gets the ServiceStatus for the specified code.
      Parameters:
      code - The DataSource status code value.
      Returns:
      The ServiceStatus that corresponds to the specified code, or UNKNOWN if an unknown code is specified.
    • getCode

      public int getCode()
      Gets the integer code for this status
      Returns:
      The internal integer code used by the Transformer core to represent this service status.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ServiceStatus>