public class RestfulResponse<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RestfulResponse.Header<X> |
static class |
RestfulResponse.HttpStatusCode |
| Modifier and Type | Method and Description |
|---|---|
T |
getEntity() |
<V> V |
getHeader(RestfulResponse.Header<V> header) |
RestfulResponse.HttpStatusCode |
getStatus() |
static RestfulResponse<JsonRepresentation> |
of(javax.ws.rs.core.Response response) |
static <T extends JsonRepresentation> |
ofT(javax.ws.rs.core.Response response) |
String |
toString() |
<Q extends JsonRepresentation> |
wraps(Class<Q> cls)
Convenience that recasts this response as wrapping some other
representation.
|
public static RestfulResponse<JsonRepresentation> of(javax.ws.rs.core.Response response)
public static <T extends JsonRepresentation> RestfulResponse<T> ofT(javax.ws.rs.core.Response response)
public RestfulResponse.HttpStatusCode getStatus()
public T getEntity() throws org.codehaus.jackson.JsonParseException, org.codehaus.jackson.map.JsonMappingException, IOException
org.codehaus.jackson.JsonParseExceptionorg.codehaus.jackson.map.JsonMappingExceptionIOExceptionpublic <V> V getHeader(RestfulResponse.Header<V> header)
public <Q extends JsonRepresentation> RestfulResponse<Q> wraps(Class<Q> cls)
This would typically be as the results of a content type being an error rather than a representation returned on success.
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.