Package io.undertow.server.handlers
Class MetricsHandler
- java.lang.Object
-
- io.undertow.server.handlers.MetricsHandler
-
- All Implemented Interfaces:
HttpHandler
public class MetricsHandler extends Object implements HttpHandler
Handler that records some metrics- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetricsHandler.MetricResult
-
Field Summary
Fields Modifier and Type Field Description static HandlerWrapper
WRAPPER
-
Constructor Summary
Constructors Constructor Description MetricsHandler(HttpHandler next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricsHandler.MetricResult
getMetrics()
void
handleRequest(HttpServerExchange exchange)
Handle the request.void
reset()
-
-
-
Field Detail
-
WRAPPER
public static final HandlerWrapper WRAPPER
-
-
Constructor Detail
-
MetricsHandler
public MetricsHandler(HttpHandler next)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
reset
public void reset()
-
getMetrics
public MetricsHandler.MetricResult getMetrics()
-
-