Class ResponseParser

java.lang.Object
com.cumulocity.sdk.client.ResponseParser

public class ResponseParser extends Object
  • Field Details

  • Constructor Details

  • 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

      protected String getErrorMessage(jakarta.ws.rs.core.Response response, int status)
    • getErrorRepresentation

      protected String getErrorRepresentation(jakarta.ws.rs.core.Response response)
    • isJsonResponse

      protected boolean isJsonResponse(jakarta.ws.rs.core.Response response)
    • parseIdFromLocation

      public GId parseIdFromLocation(jakarta.ws.rs.core.Response response)
    • write

      public Object write(Object object)