public class JsonHttpResponseCodec extends java.lang.Object implements ResponseCodec<HttpResponse>
Modifier and Type | Field and Description |
---|---|
private BeanToJsonConverter |
beanToJsonConverter |
private ErrorCodes |
errorCodes |
private JsonToBeanConverter |
jsonToBeanConverter |
Constructor and Description |
---|
JsonHttpResponseCodec() |
Modifier and Type | Method and Description |
---|---|
Response |
decode(HttpResponse encodedResponse)
Decodes a response.
|
HttpResponse |
encode(Response response)
Encodes the given response as a HTTP response message.
|
private final ErrorCodes errorCodes
private final BeanToJsonConverter beanToJsonConverter
private final JsonToBeanConverter jsonToBeanConverter
public HttpResponse encode(Response response)
encode
in interface ResponseCodec<HttpResponse>
response
- The response to encode.public Response decode(HttpResponse encodedResponse)
ResponseCodec
decode
in interface ResponseCodec<HttpResponse>
encodedResponse
- the response to decode.