Class DeserializableApiResponse<T extends WrappedApi>

  • Type Parameters:
    T - The type of the wrapped API.
    Direct Known Subclasses:
    GsonApiResponse

    public abstract class DeserializableApiResponse<T extends WrappedApi>
    extends ApiResponse<T>
    An API response that can be deserialized. Your class must have a constructor without any arguments.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.lang.Object deserialize​(ApiRequest<?> apiRequest, java.net.http.HttpResponse<?> httpResponse)
      Deserialize the response body into an object of current type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeserializableApiResponse

        public DeserializableApiResponse()
    • Method Detail

      • deserialize

        public abstract java.lang.Object deserialize​(ApiRequest<?> apiRequest,
                                                     java.net.http.HttpResponse<?> httpResponse)
        Deserialize the response body into an object of current type.
        Parameters:
        apiRequest - The API request.
        httpResponse - The HTTP response.
        Returns:
        The deserialized object.