public class DefaultRestResponseDeserializer extends Object implements RestResponseDeserializer
RestResponseDeserializer
.Modifier and Type | Method and Description |
---|---|
protected boolean |
canDeserialize(String resultType)
Verify if the provided
resultType can be deserialized. |
<A extends RestAction<R>,R> |
deserialize(A action,
Response response)
Deserializes the provided
response for the given action . |
protected <R> R |
deserializeValue(String resultType,
String json)
Deserializes the json as an object of the
resultType type. |
public <A extends RestAction<R>,R> R deserialize(A action, Response response) throws ActionException
RestResponseDeserializer
response
for the given action
.deserialize
in interface RestResponseDeserializer
A
- the RestAction
type.R
- the result type.action
- te action associated with the response to deserialize.response
- the response to deserialize.ActionException
- if an exception occurred while deserializing the response.protected boolean canDeserialize(String resultType)
resultType
can be deserialized.resultType
- the parameterized type to verify if it can be deserialized.true
if resultType
can be deserialized, false
otherwise.protected <R> R deserializeValue(String resultType, String json)
resultType
type.R
- the type of the object once deserializedresultType
- the parameterized type of the object once deserialized.json
- the json to deserialize.Copyright © 2010–2014 Arcbees. All rights reserved.