Package io.undertow.server.handlers
Class ResponseRateLimitingHandler
java.lang.Object
io.undertow.server.handlers.ResponseRateLimitingHandler
- All Implemented Interfaces:
HttpHandler
Handler that limits the download rate
- Author:
- Stuart Douglas
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResponseRateLimitingHandler(HttpHandler next, int bytes, long time, TimeUnit timeUnit) A handler that limits the download speed to a set number of bytes/period -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(HttpServerExchange exchange) Handle the request.
-
Constructor Details
-
ResponseRateLimitingHandler
A handler that limits the download speed to a set number of bytes/period- Parameters:
next- The next handlerbytes- The number of bytes per time periodtime- The time periodtimeUnit- The units of the time period
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
Exception
-