public class SimpleHttpResponseFactory extends Object implements HttpResponseFactory
HttpResponseFactory implementation.
This is the default fallback factory.INSTANCE| Constructor and Description |
|---|
SimpleHttpResponseFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T> MutableHttpResponse<T> |
ok(T body)
Creates an
HttpStatus.OK response with a body. |
<T> MutableHttpResponse<T> |
status(HttpStatus status,
String reason)
Return a response for the given status.
|
<T> MutableHttpResponse<T> |
status(HttpStatus status,
T body)
Return a response for the given status.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitok, statuspublic <T> MutableHttpResponse<T> ok(T body)
HttpResponseFactoryHttpStatus.OK response with a body.ok in interface HttpResponseFactoryT - The body typebody - The bodypublic <T> MutableHttpResponse<T> status(HttpStatus status, String reason)
HttpResponseFactorystatus in interface HttpResponseFactoryT - The response typestatus - The statusreason - An alternatively reason messagepublic <T> MutableHttpResponse<T> status(HttpStatus status, T body)
HttpResponseFactorystatus in interface HttpResponseFactoryT - The body typestatus - The statusbody - The body