Package com.caplin.datasrc.enums
Enum Class ServiceStatus
- All Implemented Interfaces:
Serializable
,Comparable<ServiceStatus>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionStatus information message.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.The status of the object is OK.One or more of the required DataSources for this object are down or have sent an explicit stale status message.Indicates that an unknown status code has been supplied. -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
Gets the integer code for this statusstatic ServiceStatus
getServiceStatusForCode
(int code) Gets theServiceStatus
for the specified code.toString()
static ServiceStatus
Returns the enum constant of this class with the specified name.static ServiceStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INFO
Status information message. -
OK
The status of the object is OK. All DataSources providing the data for it are up. -
STALE
One or more of the required DataSources for this object are down or have sent an explicit stale status 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. -
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
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
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 nameNullPointerException
- if the argument is null
-
getServiceStatusForCode
Gets theServiceStatus
for the specified code.- Parameters:
code
- The DataSource status code value.- Returns:
- The
ServiceStatus
that corresponds to the specified code, or
if an unknown code is specified.UNKNOWN
-
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
- Overrides:
toString
in classEnum<ServiceStatus>
-