public class HTTPServer extends Object
Example Usage:
HTTPServer server = new HTTPServer(1234);
| Modifier and Type | Field and Description |
|---|---|
protected com.sun.net.httpserver.HttpServer |
server |
| Constructor and Description |
|---|
HTTPServer(InetSocketAddress addr,
io.prometheus.client.CollectorRegistry registry)
Start a HTTP server serving Prometheus metrics from the given registry.
|
HTTPServer(int port)
Start a HTTP server serving the default Prometheus registry.
|
HTTPServer(String host,
int port)
Start a HTTP server serving the default Prometheus registry.
|
| Modifier and Type | Method and Description |
|---|---|
protected static Set<String> |
parseQuery(String query) |
void |
stop()
Stop the HTTP server.
|
protected com.sun.net.httpserver.HttpServer server
public HTTPServer(InetSocketAddress addr, io.prometheus.client.CollectorRegistry registry) throws IOException
IOExceptionpublic HTTPServer(int port) throws IOException
IOExceptionpublic HTTPServer(String host, int port) throws IOException
IOExceptionprotected static Set<String> parseQuery(String query) throws IOException
IOExceptionpublic void stop()
Copyright © 2017. All rights reserved.