Class HealthResponse

java.lang.Object
io.github.jopenlibs.vault.response.HealthResponse
All Implemented Interfaces:
Serializable

public class HealthResponse extends Object implements Serializable
This class is a container for the information returned by Vault in v1/sys/health operations.
See Also:
  • Constructor Details

    • 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, 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, Boolean, Integer, Integer, Integer,Integer, Integer, Integer).

      Parameters:
      restResponse - The raw HTTP response from Vault
      retries - 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

      public RestResponse getRestResponse()
    • getRetries

      public int getRetries()
    • getInitialized

      public Boolean getInitialized()
    • getSealed

      public Boolean getSealed()
    • getStandby

      public Boolean getStandby()
    • getDrsecondary

      public Boolean getDrsecondary()
    • getPerfstandby

      public Boolean getPerfstandby()
    • getuninit

      public Boolean getuninit()
    • getServerTimeUTC

      public 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.