Send feedback
Class AbstractPage<RequestT,ResponseT,ResourceT,PageT> (2.19.2)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.19.2 keyboard_arrow_down
public abstract class AbstractPage<RequestT , ResponseT , ResourceT , PageT> implements AsyncPage<ResourceT>
Implements
com.google.api.gax.paging.AsyncPage<ResourceT>
Type Parameters
Name Description RequestT ResponseT ResourceT PageT
Constructors
AbstractPage(PageContext<RequestT,ResponseT,ResourceT> context, ResponseT response)
protected AbstractPage ( PageContext<RequestT , ResponseT , ResourceT> context , ResponseT response )
Parameters
Name Description context PageContext <RequestT ,ResponseT ,ResourceT >
response ResponseT
Methods
createPage(PageContext<RequestT,ResponseT,ResourceT> context, ResponseT response)
protected abstract PageT createPage ( PageContext<RequestT , ResponseT , ResourceT> context , ResponseT response )
Parameters
Name Description context PageContext <RequestT ,ResponseT ,ResourceT >
response ResponseT
Returns
createPageAsync(PageContext<RequestT,ResponseT,ResourceT> context, ApiFuture<ResponseT> futureResponse)
public ApiFuture<PageT> createPageAsync ( PageContext<RequestT , ResponseT , ResourceT> context , ApiFuture<ResponseT> futureResponse )
Parameters
Name Description context PageContext <RequestT ,ResponseT ,ResourceT >
futureResponse com.google.api.core.ApiFuture <ResponseT >
Returns
Type Description com.google.api.core.ApiFuture <PageT >
getNextPage()
public PageT getNextPage ()
Retrieves the next Page object using the next page token, or null
if there are no more
pages. The hasNextPage() method can be used to check if a Page object is available.
Returns
getNextPage(int pageSize)
public PageT getNextPage ( int pageSize )
Parameter
Name Description pageSize int
Returns
getNextPageAsync()
public ApiFuture<PageT> getNextPageAsync ()
Returns a future for the Page object, retrieved using the next page token. If there are no more
pages, returns a future which will immediately provide null. The hasNextPage() method can be
used to check if a Page object is available.
Returns
Type Description com.google.api.core.ApiFuture <PageT >
getNextPageToken()
public String getNextPageToken ()
Returns the next page token from the response, or an empty string if there are no more pages.
Returns
getPageElementCount()
public int getPageElementCount ()
Returns
getRequest()
public RequestT getRequest ()
Returns
getResponse()
public ResponseT getResponse ()
Returns
getValues()
public Iterable<ResourceT> getValues ()
Returns an iterable over the elements in this page.
Returns
hasNextPage()
public boolean hasNextPage ()
Returns true if there are more pages that can be retrieved from the API.
Returns
iterateAll()
public Iterable<ResourceT> iterateAll ()
Returns an iterable that traverses all of the elements of the underlying data source. The data
is fetched lazily page by page, where each page may contain multiple elements. A new page is
fetched whenever the elements of any particular page are exhausted.
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-10 UTC."}