Package io.smallrye.metrics
Class MetricsRequestHandler
- java.lang.Object
-
- io.smallrye.metrics.MetricsRequestHandler
-
@ApplicationScoped public class MetricsRequestHandler extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MetricsRequestHandler.Responder
Responder is used by MetricsRequestHandler to return a response to the caller
-
Constructor Summary
Constructors Constructor Description MetricsRequestHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleRequest(String requestPath, String contextRoot, String method, Stream<String> acceptHeaders, Map<String,String[]> parameterMap, MetricsRequestHandler.Responder responder)
void
handleRequest(String requestPath, String method, Stream<String> acceptHeaders, Map<String,String[]> parameterMap, MetricsRequestHandler.Responder responder)
-
-
-
Method Detail
-
handleRequest
public void handleRequest(String requestPath, String method, Stream<String> acceptHeaders, Map<String,String[]> parameterMap, MetricsRequestHandler.Responder responder) throws IOException
- Parameters:
requestPath
- e.g. request.getRequestURI for an HttpServletmethod
- http method (GET, POST, etc)acceptHeaders
- accepted content typesparameterMap
- Map containing query parameters and valuesresponder
- a method that returns a response to the caller. SeeMetricsRequestHandler.Responder
- Throws:
IOException
- rethrows IOException if thrown by the responder You can find example usage in the tests, in io.smallrye.metrics.tck.rest.MetricsHttpServlet
-
handleRequest
public void handleRequest(String requestPath, String contextRoot, String method, Stream<String> acceptHeaders, Map<String,String[]> parameterMap, MetricsRequestHandler.Responder responder) throws IOException
- Parameters:
requestPath
- e.g. request.getRequestURI for an HttpServletcontextRoot
- the root at which Metrics are exposed, usually "/metrics"method
- http method (GET, POST, etc)acceptHeaders
- accepted content typesparameterMap
- Map containing query parameters and valuesresponder
- a method that returns a response to the caller. SeeMetricsRequestHandler.Responder
- Throws:
IOException
- rethrows IOException if thrown by the responder You can find example usage in the tests, in io.smallrye.metrics.tck.rest.MetricsHttpServlet
-
-