Class ResponseRateLimitingHandler

  • All Implemented Interfaces:
    HttpHandler

    public class ResponseRateLimitingHandler
    extends Object
    implements HttpHandler
    Handler that limits the download rate
    Author:
    Stuart Douglas
    • Constructor Detail

      • ResponseRateLimitingHandler

        public ResponseRateLimitingHandler​(HttpHandler next,
                                           int bytes,
                                           long time,
                                           TimeUnit timeUnit)
        A handler that limits the download speed to a set number of bytes/period
        Parameters:
        next - The next handler
        bytes - The number of bytes per time period
        time - The time period
        timeUnit - The units of the time period