HttpHandlerpublic class ResponseRateLimitingHandler extends Object implements HttpHandler
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ResponseRateLimitingHandler.Builder |
| Constructor | Description |
|---|---|
ResponseRateLimitingHandler(HttpHandler next,
int bytes,
long time,
TimeUnit timeUnit) |
A handler that limits the download speed to a set number of bytes/period
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
handleRequest(HttpServerExchange exchange) |
Handle the request.
|
public ResponseRateLimitingHandler(HttpHandler next, int bytes, long time, TimeUnit timeUnit)
next - The next handlerbytes - The number of bytes per time periodtime - The time periodtimeUnit - The units of the time periodpublic void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionCopyright © 2018. All rights reserved.