Package io.undertow.server.handlers
Class BlockingWriteTimeoutHandler
- java.lang.Object
-
- io.undertow.server.handlers.BlockingWriteTimeoutHandler
-
- All Implemented Interfaces:
HttpHandler
public final class BlockingWriteTimeoutHandler extends Object implements HttpHandler
BlockingTimeoutHandler allows configurable blocking I/O timeouts for write operations within an exchange.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 theServerConnection
is closed.- Author:
- Carter Kozak
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockingWriteTimeoutHandler.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlockingWriteTimeoutHandler.Builder
builder()
void
handleRequest(HttpServerExchange exchange)
Handle the request.
-
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
builder
public static BlockingWriteTimeoutHandler.Builder builder()
-
-