use of io.undertow.server.handlers.MetricsHandler in project undertow by undertow-io.
the class MetricsChainHandler method handleRequest.
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
ServletInfo servletInfo = context.getCurrentServlet().getManagedServlet().getServletInfo();
MetricsHandler handler = servletHandlers.get(servletInfo.getName());
if (handler != null) {
handler.handleRequest(exchange);
} else {
next.handleRequest(exchange);
}
}
Aggregations