Package com.cumulocity.sdk.client
Class ResponseParser
java.lang.Object
com.cumulocity.sdk.client.ResponseParser
-
Field Summary
-
Constructor Summary
ConstructorDescriptionResponseParser
(ResponseMapper mapper) ResponseParser
(ResponseMapper mapper, PlatformParameters platformParameters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkStatus
(jakarta.ws.rs.core.Response response, int... expectedStatusCodes) protected String
getErrorMessage
(jakarta.ws.rs.core.Response response, int status) protected String
getErrorRepresentation
(jakarta.ws.rs.core.Response response) protected boolean
isJsonResponse
(jakarta.ws.rs.core.Response response) <T extends ResourceRepresentation>
TparseIdFromLocation
(jakarta.ws.rs.core.Response response) <T> T
parseObject
(jakarta.ws.rs.core.Response response, int expectedStatusCode, Class<T> type)
-
Field Details
-
NO_ERROR_REPRESENTATION
- See Also:
-
-
Constructor Details
-
ResponseParser
-
ResponseParser
-
ResponseParser
public ResponseParser()
-
-
Method Details
-
parse
public <T extends ResourceRepresentation> T parse(jakarta.ws.rs.core.Response response, Class<T> type, int... expectedStatusCodes) throws SDKException - Throws:
SDKException
-
parseObject
public <T> T parseObject(jakarta.ws.rs.core.Response response, int expectedStatusCode, Class<T> type) throws SDKException - Throws:
SDKException
-
checkStatus
public void checkStatus(jakarta.ws.rs.core.Response response, int... expectedStatusCodes) throws SDKException - Throws:
SDKException
-
getErrorMessage
-
getErrorRepresentation
-
isJsonResponse
protected boolean isJsonResponse(jakarta.ws.rs.core.Response response) -
parseIdFromLocation
-
write
-