Class AbstractPage<RequestT,​ResponseT,​ResourceT,​PageT extends AbstractPage<RequestT,​ResponseT,​ResourceT,​PageT>>

  • All Implemented Interfaces:
    AsyncPage<ResourceT>, Page<ResourceT>

    public abstract class AbstractPage<RequestT,​ResponseT,​ResourceT,​PageT extends AbstractPage<RequestT,​ResponseT,​ResourceT,​PageT>>
    extends Object
    implements AsyncPage<ResourceT>
    Partial implementation of AsyncPage.
    • Method Detail

      • hasNextPage

        public boolean hasNextPage()
        Description copied from interface: Page
        Returns true if there are more pages that can be retrieved from the API.
        Specified by:
        hasNextPage in interface Page<RequestT>
      • getNextPageToken

        public String getNextPageToken()
        Description copied from interface: Page
        Returns the next page token from the response, or an empty string if there are no more pages.
        Specified by:
        getNextPageToken in interface Page<RequestT>
      • getNextPage

        public PageT getNextPage()
        Description copied from interface: Page
        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.
        Specified by:
        getNextPage in interface Page<RequestT>
      • getNextPage

        public PageT getNextPage​(int pageSize)
      • getNextPageAsync

        public ApiFuture<PageT> getNextPageAsync()
        Description copied from interface: AsyncPage
        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.
        Specified by:
        getNextPageAsync in interface AsyncPage<RequestT>
      • iterateAll

        public Iterable<ResourceT> iterateAll()
        Description copied from interface: Page
        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.
        Specified by:
        iterateAll in interface Page<RequestT>
      • getResponse

        public ResponseT getResponse()
      • getRequest

        public RequestT getRequest()
      • getPageElementCount

        public int getPageElementCount()