Class ResponseBase<H,​T>

  • Type Parameters:
    H - The deserialized type of the response headers.
    T - The deserialized type of the response value, available from Response.getValue().
    All Implemented Interfaces:
    Response<T>

    public class ResponseBase<H,​T>
    extends java.lang.Object
    implements Response<T>
    The response of a REST request.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResponseBase​(com.azure.android.core.http.HttpRequest request, int statusCode, com.azure.android.core.http.HttpHeaders headers, T value, H deserializedHeaders)
      Creates a ResponseBase.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      H getDeserializedHeaders()
      Get the headers from the HTTP response, transformed into the header type, H.
      com.azure.android.core.http.HttpHeaders getHeaders()
      Gets the headers from the HTTP response.
      com.azure.android.core.http.HttpRequest getRequest()
      Gets The request which resulted in this ResponseBase.
      int getStatusCode()
      Gets the HTTP response status code.
      T getValue()
      Gets the deserialized value of the HTTP response.
      • Methods inherited from class java.lang.Object

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

      • ResponseBase

        public ResponseBase​(com.azure.android.core.http.HttpRequest request,
                            int statusCode,
                            com.azure.android.core.http.HttpHeaders headers,
                            T value,
                            H deserializedHeaders)
        Creates a ResponseBase.
        Parameters:
        request - The HTTP request which resulted in this response.
        statusCode - The status code of the HTTP response.
        headers - The headers of the HTTP response.
        deserializedHeaders - The deserialized headers of the HTTP response.
        value - The deserialized value of the HTTP response.
    • Method Detail

      • getRequest

        public com.azure.android.core.http.HttpRequest getRequest()
        Gets The request which resulted in this ResponseBase.
        Specified by:
        getRequest in interface Response<H>
        Returns:
        The request which resulted in this ResponseBase.
      • getStatusCode

        public int getStatusCode()
        Gets the HTTP response status code.
        Specified by:
        getStatusCode in interface Response<H>
        Returns:
        The status code of the HTTP response.
      • getHeaders

        public com.azure.android.core.http.HttpHeaders getHeaders()
        Gets the headers from the HTTP response.
        Specified by:
        getHeaders in interface Response<H>
        Returns:
        The HTTP response headers.
      • getDeserializedHeaders

        public H getDeserializedHeaders()
        Get the headers from the HTTP response, transformed into the header type, H.
        Returns:
        An instance of header type H, deserialized from the HTTP response headers.
      • getValue

        public T getValue()
        Gets the deserialized value of the HTTP response.
        Specified by:
        getValue in interface Response<H>
        Returns:
        The deserialized value of the HTTP response.