public enum ServiceStatus extends Enum<ServiceStatus>
The getServiceStatusForCode(int)
static method should be used to obtain the correct
ServiceStatus
for a particular status code received from DataSource.
Enum Constant and 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.
|
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Gets the integer code for this status
|
static ServiceStatus |
getServiceStatusForCode(int code)
Gets the
ServiceStatus for the specified code. |
String |
toString() |
static ServiceStatus |
valueOf(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.
|
public static final ServiceStatus INFO
public static final ServiceStatus OK
public static final ServiceStatus STALE
public static final ServiceStatus LIMITED
public static final ServiceStatus UNKNOWN
public static ServiceStatus[] values()
for (ServiceStatus c : ServiceStatus.values()) System.out.println(c);
public static ServiceStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ServiceStatus getServiceStatusForCode(int code)
ServiceStatus
for the specified code.code
- The DataSource status code value.ServiceStatus
that corresponds to the specified code, or
UNKNOWN
if an unknown code is specified.public int getCode()
public String toString()
toString
in class Enum<ServiceStatus>
Please send bug reports and comments to Caplin support