Class StreamMessagesPage<T>

java.lang.Object
io.superdurable.dex.StreamMessagesPage<T>
Type Parameters:
T - the decoded Stream message type

public final class StreamMessagesPage<T> extends Object
Contains one newest-first page returned by Client.listStreamMessages(String, Stream, int, String).

Pass a nonempty next-page token unchanged to the next call. The returned message list is immutable. Stream trimming may remove messages between pages.

  • Method Details

    • getMessages

      public List<StreamMessage<T>> getMessages()
      Returns retained messages in newest-first order.
      Returns:
      an immutable message list
    • getNextPageToken

      public String getNextPageToken()
      Returns the token for fetching the next older page.
      Returns:
      the opaque token, or an empty string on the final page