Class RunningRequestsHttpHandler

  • All Implemented Interfaces:
    io.undertow.server.HttpHandler

    public class RunningRequestsHttpHandler
    extends Object
    implements io.undertow.server.HttpHandler
    HttpHandler implementation that counts number of active / running requests to replace the busyness metric.
    Since:
    8.0
    Author:
    Radoslav Husar
    • Constructor Detail

      • RunningRequestsHttpHandler

        public RunningRequestsHttpHandler​(io.undertow.server.HttpHandler handler)
    • Method Detail

      • handleRequest

        public void handleRequest​(io.undertow.server.HttpServerExchange exchange)
                           throws Exception
        Increments the counter and registers a listener to decrement the counter upon exchange complete event.
        Specified by:
        handleRequest in interface io.undertow.server.HttpHandler
        Throws:
        Exception
      • getRunningRequestCount

        public static int getRunningRequestCount()