Package io.vertx.ext.web.handler
Interface TimeoutHandler
-
- All Superinterfaces:
Handler<RoutingContext>
,PlatformHandler
public interface TimeoutHandler extends PlatformHandler
Handler that will timeout requests if the response has not been written after a certain time. Timeout requests will be ended with an HTTP status code `503`.- Author:
- Tim Fox
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ERRORCODE
The default error codestatic long
DEFAULT_TIMEOUT
The default timeout, in ms
-
Method Summary
Static Methods Modifier and Type Method Description static TimeoutHandler
create()
Create a handlerstatic TimeoutHandler
create(long timeout)
Create a handlerstatic TimeoutHandler
create(long timeout, int errorCode)
Create a handler
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
static final long DEFAULT_TIMEOUT
The default timeout, in ms- See Also:
- Constant Field Values
-
DEFAULT_ERRORCODE
static final int DEFAULT_ERRORCODE
The default error code- See Also:
- Constant Field Values
-
-
Method Detail
-
create
static TimeoutHandler create()
Create a handler- Returns:
- the handler
-
create
static TimeoutHandler create(long timeout)
Create a handler- Parameters:
timeout
- the timeout, in ms- Returns:
- the handler
-
create
static TimeoutHandler create(long timeout, int errorCode)
Create a handler- Parameters:
timeout
- the timeout, in ms- Returns:
- the handler
-
-