public final class RequestLimitingHandler extends Object implements HttpHandler
Modifier and Type | Class and Description |
---|---|
static class | RequestLimitingHandler.Builder |
Constructor and Description |
---|
RequestLimitingHandler(int maximumConcurrentRequests, HttpHandler nextHandler) Construct a new instance. |
RequestLimitingHandler(int maximumConcurrentRequests, int queueSize, HttpHandler nextHandler) Construct a new instance. |
RequestLimitingHandler(RequestLimit requestLimit, HttpHandler nextHandler) Construct a new instance. |
Modifier and Type | Method and Description |
---|---|
RequestLimit | getRequestLimit() |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
public RequestLimitingHandler(int maximumConcurrentRequests, HttpHandler nextHandler)
null
.maximumConcurrentRequests
- the maximum concurrent requestsnextHandler
- the next handlerpublic RequestLimitingHandler(int maximumConcurrentRequests, int queueSize, HttpHandler nextHandler)
null
.maximumConcurrentRequests
- the maximum concurrent requestsqueueSize
- the maximum number of requests to queuenextHandler
- the next handlerpublic RequestLimitingHandler(RequestLimit requestLimit, HttpHandler nextHandler)
RequestLimit
directly which may be shared with other handlers.requestLimit
- the request limit information.nextHandler
- the next handlerpublic void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public RequestLimit getRequestLimit()
Copyright © 2017 JBoss by Red Hat. All rights reserved.