public final class BlockingWriteTimeoutHandler extends Object implements HttpHandler
Unlike Options.WRITE_TIMEOUT this only applies to blocking operations which can be helpful to prevent the worker pool from becoming saturated when clients stop responding.
When a timeout occurs, a WriteTimeoutException
is thrown, and the
ServerConnection
is closed.
Modifier and Type | Class and Description |
---|---|
static class |
BlockingWriteTimeoutHandler.Builder |
Modifier and Type | Method and Description |
---|---|
static BlockingWriteTimeoutHandler.Builder |
builder() |
void |
handleRequest(HttpServerExchange exchange)
Handle the request.
|
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public static BlockingWriteTimeoutHandler.Builder builder()
Copyright © 2021 JBoss by Red Hat. All rights reserved.