public class HttpStatusHandler extends Object implements Handler
Handler
that responds with a specific HttpStatus
.Constructor and Description |
---|
HttpStatusHandler()
Create a new
HttpStatusHandler instance that will respond with a HTTP OK
200 status. |
HttpStatusHandler(HttpStatus status)
Create a new
HttpStatusHandler instance that will respond with the
specified status. |
Modifier and Type | Method and Description |
---|---|
void |
handle(ServerHttpRequest request,
ServerHttpResponse response)
Handle the request.
|
public HttpStatusHandler()
HttpStatusHandler
instance that will respond with a HTTP OK
200 status.public HttpStatusHandler(HttpStatus status)
HttpStatusHandler
instance that will respond with the
specified status.status
- the statuspublic void handle(ServerHttpRequest request, ServerHttpResponse response) throws IOException
Handler
handle
in interface Handler
request
- the requestresponse
- the responseIOException
- in case of I/O errorsCopyright © 2021 Pivotal Software, Inc.. All rights reserved.