Class HealthResponse

  • All Implemented Interfaces:
    Response

    public class HealthResponse
    extends java.lang.Object
    implements Response
    • Constructor Detail

      • HealthResponse

        public HealthResponse​(java.lang.String contentType,
                              int statusCode,
                              java.net.http.HttpResponse<java.io.InputStream> rawResponse,
                              java.util.Optional<? extends HealthyServer> healthyServer)
      • HealthResponse

        public HealthResponse​(java.lang.String contentType,
                              int statusCode,
                              java.net.http.HttpResponse<java.io.InputStream> rawResponse)
    • Method Detail

      • contentType

        public java.lang.String contentType()
        HTTP response content type for this operation
        Specified by:
        contentType in interface Response
      • statusCode

        public int statusCode()
        HTTP response status code for this operation
        Specified by:
        statusCode in interface Response
      • rawResponse

        public java.net.http.HttpResponse<java.io.InputStream> rawResponse()
        Raw HTTP response; suitable for custom response parsing
        Specified by:
        rawResponse in interface Response
      • healthyServer

        public java.util.Optional<HealthyServer> healthyServer()
        OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
      • withContentType

        public HealthResponse withContentType​(java.lang.String contentType)
        HTTP response content type for this operation
      • withStatusCode

        public HealthResponse withStatusCode​(int statusCode)
        HTTP response status code for this operation
      • withRawResponse

        public HealthResponse withRawResponse​(java.net.http.HttpResponse<java.io.InputStream> rawResponse)
        Raw HTTP response; suitable for custom response parsing
      • withHealthyServer

        public HealthResponse withHealthyServer​(HealthyServer healthyServer)
        OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
      • withHealthyServer

        public HealthResponse withHealthyServer​(java.util.Optional<? extends HealthyServer> healthyServer)
        OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object