Freigeben über


PagedResponseBase<H,T> Class

  • java.lang.Object
    • com.azure.core.http.rest.PagedResponseBase<H,T>

Type Parameters

H

The HTTP response headers

T

The type of items contained in the Page

Implements

public class PagedResponseBase<H,T>
implements PagedResponse<T>

Represents an HTTP response that contains a list of items deserialized into a Page<T>.

Constructor Summary

Constructor Description
PagedResponseBase(HttpRequest request, int statusCode, HttpHeaders headers, Page<T> page, H deserializedHeaders)

Creates a new instance of the PagedResponseBase type.

PagedResponseBase(HttpRequest request, int statusCode, HttpHeaders headers, List<T> items, String continuationToken, H deserializedHeaders)

Creates a new instance of the PagedResponseBase type.

Method Summary

Modifier and Type Method and Description
void close()
String getContinuationToken()

Gets the reference to the next page.

H getDeserializedHeaders()

Get the headers from the HTTP response, transformed into the header type H.

IterableStream<T> getElements()

Gets an IterableStream<T> of elements in the page.

HttpHeaders getHeaders()

Gets the headers from the HTTP response.

HttpRequest getRequest()

Gets the HTTP request which resulted in this response.

int getStatusCode()

Gets the HTTP response status code.

Methods inherited from java.lang.Object

Constructor Details

PagedResponseBase

public PagedResponseBase(HttpRequest request, int statusCode, HttpHeaders headers, Page 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 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 Details

close

public void close()

getContinuationToken

public String getContinuationToken()

Gets the reference to the next page.

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.

getElements

public IterableStream getElements()

Gets an IterableStream<T> of elements in the page.

getHeaders

public HttpHeaders getHeaders()

Gets the headers from the HTTP response.

getRequest

public HttpRequest getRequest()

Gets the HTTP request which resulted in this response.

Returns:

the request which resulted in this PagedRequestResponse.

getStatusCode

public int getStatusCode()

Gets the HTTP response status code.

Applies to