Interface PaginatedResult<T>

Type Parameters:
T -

public interface PaginatedResult<T>
Contains a page of results for message or presence history, stats, or REST presence requests. A PaginatedResult response from a REST API paginated query is also accompanied by metadata that indicates the relative queries available to the PaginatedResult object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new PaginatedResult for the current page of results.
    Returns a new PaginatedResult for the first page of results.
    boolean
     
    boolean
     
    boolean
    Returns true if there are more pages available by calling next and returns false if this page is the last page available.
    boolean
    Returns true if this page is the last page and returns false if there are more pages available by calling next available.
    T[]
    Contains the current page of results; for example, an array of Message or PresenceMessage objects for a channel history request.
    Returns a new PaginatedResult loaded with the next page of results.
  • Method Details

    • items

      T[] items()
      Contains the current page of results; for example, an array of Message or PresenceMessage objects for a channel history request.

      Spec: TG3

    • first

      PaginatedResult<T> first() throws AblyException
      Returns a new PaginatedResult for the first page of results.

      Spec: TG5

      Throws:
      AblyException
    • current

      PaginatedResult<T> current() throws AblyException
      Returns a new PaginatedResult for the current page of results.

      Spec: TG5

      Throws:
      AblyException
    • next

      PaginatedResult<T> next() throws AblyException
      Returns a new PaginatedResult loaded with the next page of results. If there are no further pages, then null is returned.

      Spec: TG4

      Returns:
      A page of results for message and presence history, stats, and REST presence requests.
      Throws:
      AblyException
    • hasFirst

      boolean hasFirst()
    • hasCurrent

      boolean hasCurrent()
    • hasNext

      boolean hasNext()
      Returns true if there are more pages available by calling next and returns false if this page is the last page available.

      Spec: TG6

      Returns:
      Whether or not there are more pages of results.
    • isLast

      boolean isLast()
      Returns true if this page is the last page and returns false if there are more pages available by calling next available.

      Spec: TG7

      Returns:
      Whether or not this is the last page of results.