Class HttpExchangeAdapter.Response

Object
Response
All Implemented Interfaces:
PrometheusHttpResponse
Enclosing class:
HttpExchangeAdapter

public static class HttpExchangeAdapter.Response extends Object implements PrometheusHttpResponse
This inner class adapts a HttpServletResponse to a PrometheusHttpResponse.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Response(HttpServletResponse response)
    Constructs a new Response with the given HttpServletResponse.
  • Method Summary

    Modifier and Type
    Method
    Description
    sendHeadersAndGetBody(int statusCode, int contentLength)
    This is equivalent to calling HttpExchange.sendResponseHeaders(int, long) followed by HttpExchange.getResponseBody().
    void
    setHeader(String name, String value)
    See jakarta.servlet.http.HttpServletResponse.setHeader(String, String)

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait