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 TypeMethodDescriptionvoid
handleRequest
(HttpServerExchange exchange) Handle the request.toString()
-
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:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
toString
-