Package io.undertow.server.handlers
Class BlockingReadTimeoutHandler
- java.lang.Object
-
- io.undertow.server.handlers.BlockingReadTimeoutHandler
-
- All Implemented Interfaces:
HttpHandler
public final class BlockingReadTimeoutHandler extends java.lang.Object implements HttpHandler
BlockingReadTimeoutHandlerallows configurable blocking I/O timeouts for read operations within an exchange.Unlike Options.READ_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
ReadTimeoutExceptionis thrown, and theServerConnectionis closed.- Author:
- Carter Kozak
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockingReadTimeoutHandler.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlockingReadTimeoutHandler.Builderbuilder()voidhandleRequest(HttpServerExchange exchange)Handle the request.
-
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws java.lang.Exception
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
java.lang.Exception
-
builder
public static BlockingReadTimeoutHandler.Builder builder()
-
-