Class HTTPServer
Object
HTTPServer
- All Implemented Interfaces:
- Closeable, AutoCloseable
Expose Prometheus metrics using a plain Java HttpServer.
Example Usage:
HTTPServer server = HTTPServer.builder()
    .port(9090)
    .buildAndStart();
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic HTTPServer.Builderbuilder()static HTTPServer.Builderbuilder(PrometheusProperties config) voidclose()Stop the HTTPServer.intgetPort()Gets the port number.voidstop()Stop the HTTP server.
- 
Method Details- 
stop
- 
close
- 
getPortGets the port number. This is useful if you did not specify a port and the server picked a free port automatically.
- 
builder
- 
builder
 
-