- java.lang.Object
-
- io.github.jopenlibs.vault.response.HealthResponse
-
- All Implemented Interfaces:
java.io.Serializable
public class HealthResponse extends java.lang.Object implements java.io.Serializable
This class is a container for the information returned by Vault inv1/sys/health
operations.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HealthResponse(RestResponse restResponse, int retries)
Constructs aHealthResponse
object from the data received in a health check operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getInitialized()
RestResponse
getRestResponse()
int
getRetries()
java.lang.Boolean
getSealed()
java.lang.Long
getServerTimeUTC()
java.lang.Boolean
getStandby()
-
-
-
Constructor Detail
-
HealthResponse
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
, andserverTimeUTC
set 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 Detail
-
getRestResponse
public RestResponse getRestResponse()
-
getRetries
public int getRetries()
-
getInitialized
public java.lang.Boolean getInitialized()
-
getSealed
public java.lang.Boolean getSealed()
-
getStandby
public java.lang.Boolean getStandby()
-
getServerTimeUTC
public java.lang.Long 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.
-
-