io.prometheus.metrics.exporter.common.PrometheusHttpResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmx_prometheus_httpserver Show documentation
Show all versions of jmx_prometheus_httpserver Show documentation
See https://github.com/prometheus/jmx_exporter/blob/master/README.md
package io.prometheus.metrics.exporter.common;
import java.io.IOException;
import java.io.OutputStream;
public interface PrometheusHttpResponse {
/**
* See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
*/
void setHeader(String name, String value);
/**
* This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
* followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
*/
OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy