public class ResponseParser extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NO_ERROR_REPRESENTATION |
Constructor and Description |
---|
ResponseParser() |
ResponseParser(ResponseMapper mapper) |
Modifier and Type | Method and Description |
---|---|
void |
checkStatus(com.sun.jersey.api.client.ClientResponse response,
int... expectedStatusCodes) |
protected String |
getErrorMessage(com.sun.jersey.api.client.ClientResponse response,
int status) |
protected String |
getErrorRepresentation(com.sun.jersey.api.client.ClientResponse response) |
protected boolean |
isJsonResponse(com.sun.jersey.api.client.ClientResponse response) |
<T extends ResourceRepresentation> |
parse(com.sun.jersey.api.client.ClientResponse response,
Class<T> type,
int... expectedStatusCodes) |
com.cumulocity.model.idtype.GId |
parseIdFromLocation(com.sun.jersey.api.client.ClientResponse response) |
<T> T |
parseObject(com.sun.jersey.api.client.ClientResponse response,
int expectedStatusCode,
Class<T> type) |
Object |
write(Object object) |
public static final String NO_ERROR_REPRESENTATION
public ResponseParser(ResponseMapper mapper)
public ResponseParser()
public <T extends ResourceRepresentation> T parse(com.sun.jersey.api.client.ClientResponse response, Class<T> type, int... expectedStatusCodes) throws SDKException
SDKException
public <T> T parseObject(com.sun.jersey.api.client.ClientResponse response, int expectedStatusCode, Class<T> type) throws SDKException
SDKException
public void checkStatus(com.sun.jersey.api.client.ClientResponse response, int... expectedStatusCodes) throws SDKException
SDKException
protected String getErrorMessage(com.sun.jersey.api.client.ClientResponse response, int status)
protected String getErrorRepresentation(com.sun.jersey.api.client.ClientResponse response)
protected boolean isJsonResponse(com.sun.jersey.api.client.ClientResponse response)
public com.cumulocity.model.idtype.GId parseIdFromLocation(com.sun.jersey.api.client.ClientResponse response)
Copyright © 2020 (C) Cumulocity GmbH. All rights reserved.