public class HealthResponse
extends java.lang.Object
v1/sys/health
operations.Constructor and Description |
---|
HealthResponse(RestResponse restResponse,
int retries)
Constructs a
HealthResponse object from the data received in a health
check operation. |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getInitialized() |
RestResponse |
getRestResponse() |
int |
getRetries() |
java.lang.Boolean |
getSealed() |
java.lang.Long |
getServerTimeUTC() |
java.lang.Boolean |
getStandby() |
public HealthResponse(RestResponse restResponse, int retries) throws VaultException
Constructs a HealthResponse
object from the data received in a health
check operation.
Note that if the REST response is valid, but has an empty payload, this constructor
will silently return an instance with initialized
, sealed
,
standby
, and serverTimeUTC
set to null
. This
typically happens when you use optional parameters in the health call, to designate
non-standard HTTP status codes. See docs for
Debug.health(Boolean, Integer, Integer, Integer)
.
restResponse
- The raw HTTP response from Vaultretries
- The number of retry attempts that occurred during the API call (can be zero)VaultException
- If any error occurs or unexpected response is received from Vaultpublic RestResponse getRestResponse()
public int getRetries()
public java.lang.Boolean getInitialized()
public java.lang.Boolean getSealed()
public java.lang.Boolean getStandby()
public java.lang.Long getServerTimeUTC()