Class ActiveRequestTrackerHandler

  • All Implemented Interfaces:
    HttpHandler

    public final class ActiveRequestTrackerHandler
    extends java.lang.Object
    implements HttpHandler
    This handler will track all active requests. If the predicate is either null or true, a RequestStatistics object is created and stored in the handler. Once the request is finished, the RequestStatistics object is removed from the local store, and flow continues to the next listener.
    Author:
    Jason Lee
    • Constructor Detail

      • ActiveRequestTrackerHandler

        public ActiveRequestTrackerHandler​(HttpHandler next,
                                           Predicate predicate)
    • Method Detail

      • handleRequest

        public void handleRequest​(HttpServerExchange exchange)
                           throws java.lang.Exception
        Description copied from interface: HttpHandler
        Handle the request.
        Specified by:
        handleRequest in interface HttpHandler
        Parameters:
        exchange - the HTTP request/response exchange
        Throws:
        java.lang.Exception