java.lang.Object
io.github.jopenlibs.vault.response.HealthResponse
- All Implemented Interfaces:
Serializable
This class is a container for the information returned by Vault in
v1/sys/health
operations.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHealthResponse(RestResponse restResponse, int retries) Constructs aHealthResponseobject from the data received in a health check operation. -
Method Summary
Modifier and TypeMethodDescriptionint
-
Constructor Details
-
HealthResponse
Constructs a
HealthResponseobject 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, andserverTimeUTCset tonull. This typically happens when you use optional parameters in the health call, to designate non-standard HTTP status codes. See docs forDebug.health(Boolean, Integer, Integer, Integer).- Parameters:
restResponse- The raw HTTP response from Vaultretries- The number of retry attempts that occurred during the API call (can be zero)- Throws:
VaultException- If any error occurs or unexpected response is received from Vault
-
-
Method Details
-
getRestResponse
-
getRetries
public int getRetries() -
getInitialized
-
getSealed
-
getStandby
-
getServerTimeUTC
- Returns:
- A value representing the number of milliseconds since the epoch. With all of the changes in date API's between Java 8 and pre-Java 8, it seemed best for the library not to convert this value into any particular one.
-