Class HttpExchangeAdapter.Response
Object
Response
- All Implemented Interfaces:
PrometheusHttpResponse
- Enclosing class:
HttpExchangeAdapter
This inner class adapts a HttpServletResponse to a PrometheusHttpResponse.
-
Constructor Summary
ConstructorsConstructorDescriptionResponse(HttpServletResponse response) Constructs a new Response with the given HttpServletResponse. -
Method Summary
Modifier and TypeMethodDescriptionsendHeadersAndGetBody(int statusCode, int contentLength) This is equivalent to callingHttpExchange.sendResponseHeaders(int, long)followed byHttpExchange.getResponseBody().voidSeejakarta.servlet.http.HttpServletResponse.setHeader(String, String)
-
Constructor Details
-
Response
Constructs a new Response with the given HttpServletResponse.- Parameters:
response- the HttpServletResponse to be adapted
-
-
Method Details
-
setHeader
Description copied from interface:PrometheusHttpResponseSeejakarta.servlet.http.HttpServletResponse.setHeader(String, String)- Specified by:
setHeaderin interfacePrometheusHttpResponse
-
sendHeadersAndGetBody
Description copied from interface:PrometheusHttpResponseThis is equivalent to callingHttpExchange.sendResponseHeaders(int, long)followed byHttpExchange.getResponseBody().- Specified by:
sendHeadersAndGetBodyin interfacePrometheusHttpResponse- Throws:
IOException
-