java.lang.Object
io.prometheus.metrics.exporter.servlet.javax.HttpExchangeAdapter.Response
All Implemented Interfaces:
io.prometheus.metrics.exporter.common.PrometheusHttpResponse
Enclosing class:
HttpExchangeAdapter

public static class HttpExchangeAdapter.Response extends Object implements io.prometheus.metrics.exporter.common.PrometheusHttpResponse
This inner class adapts a HttpServletResponse to a PrometheusHttpResponse.
  • Constructor Details

    • Response

      public Response(javax.servlet.http.HttpServletResponse response)
      Constructs a new Response with the given HttpServletResponse.
      Parameters:
      response - the HttpServletResponse to be adapted
  • Method Details

    • setHeader

      public void setHeader(String name, String value)
      Specified by:
      setHeader in interface io.prometheus.metrics.exporter.common.PrometheusHttpResponse
    • sendHeadersAndGetBody

      public OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException
      Specified by:
      sendHeadersAndGetBody in interface io.prometheus.metrics.exporter.common.PrometheusHttpResponse
      Throws:
      IOException