Enum ServiceStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ServiceStatus>

    public enum ServiceStatus
    extends java.lang.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 Summary

      Enum Constants 
      Enum Constant Description
      INFO
      Status information message.
      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.
      OK
      The status of the object is OK.
      STALE
      One or more of the required DataSources for this object are down or have sent an explicit stale status message.
      UNKNOWN
      Indicates that an unknown status code has been supplied.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      Gets the integer code for this status
      static ServiceStatus getServiceStatusForCode​(int code)
      Gets the ServiceStatus for the specified code.
      java.lang.String toString()  
      static ServiceStatus valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ServiceStatus[] 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, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

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

      • values

        public static ServiceStatus[] 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 (ServiceStatus c : ServiceStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ServiceStatus valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<ServiceStatus>