Class PagedResponseBase<H,​T>

    • Constructor Detail

      • PagedResponseBase

        public PagedResponseBase​(HttpRequest request,
                                 int statusCode,
                                 HttpHeaders headers,
                                 Page<T> page,
                                 H deserializedHeaders)
        Creates a new instance of the PagedResponseBase type.
        Parameters:
        request - The HttpRequest that was sent to the service whose response resulted in this response.
        statusCode - The status code from the response.
        headers - The headers from the response.
        page - The page of content returned from the service within the response.
        deserializedHeaders - The headers, deserialized into an instance of type H.
      • PagedResponseBase

        public PagedResponseBase​(HttpRequest request,
                                 int statusCode,
                                 HttpHeaders headers,
                                 List<T> items,
                                 String continuationToken,
                                 H deserializedHeaders)
        Creates a new instance of the PagedResponseBase type.
        Parameters:
        request - The HttpRequest that was sent to the service whose response resulted in this response.
        statusCode - The status code from the response.
        headers - The headers from the response.
        items - The items returned from the service within the response.
        continuationToken - The continuation token returned from the service, to enable future requests to pick up from the same place in the paged iteration.
        deserializedHeaders - The headers, deserialized into an instance of type H.
    • Method Detail

      • getContinuationToken

        public String getContinuationToken()
        Gets the reference to the next page.
        Specified by:
        getContinuationToken in interface ContinuablePage<H,​T>
        Returns:
        The next page reference or null if there isn't a next page.
      • 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 HttpHeaders getHeaders()
        Gets the headers from the HTTP response.
        Specified by:
        getHeaders in interface Response<H>
        Returns:
        The HTTP response headers.
      • getRequest

        public HttpRequest getRequest()
        Description copied from interface: Response
        Gets the HTTP request which resulted in this response.
        Specified by:
        getRequest in interface Response<H>
        Returns:
        the request which resulted in this PagedRequestResponse.
      • getDeserializedHeaders

        public H getDeserializedHeaders()
        Get the headers from the HTTP response, transformed into the header type H.
        Returns:
        an instance of header type H, containing the HTTP response headers.