HttpHandlerpublic final class ResponseCodeHandler extends Object implements HttpHandler
| Modifier and Type | Field | Description |
|---|---|---|
static ResponseCodeHandler |
HANDLE_200 |
A handler which sets a 200 code.
|
static ResponseCodeHandler |
HANDLE_403 |
A handler which sets a 403 code.
|
static ResponseCodeHandler |
HANDLE_404 |
A handler which sets a 404 code.
|
static ResponseCodeHandler |
HANDLE_405 |
A handler which sets a 405 code.
|
static ResponseCodeHandler |
HANDLE_406 |
A handler which sets a 406 code.
|
static ResponseCodeHandler |
HANDLE_500 |
A handler which sets a 500 code.
|
| Constructor | Description |
|---|---|
ResponseCodeHandler(int responseCode) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
handleRequest(HttpServerExchange exchange) |
Handle the request.
|
public static final ResponseCodeHandler HANDLE_200
public static final ResponseCodeHandler HANDLE_403
public static final ResponseCodeHandler HANDLE_404
public static final ResponseCodeHandler HANDLE_405
public static final ResponseCodeHandler HANDLE_406
public static final ResponseCodeHandler HANDLE_500
public ResponseCodeHandler(int responseCode)
responseCode - the response code to setpublic void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionCopyright © 2018. All rights reserved.