Interface PagedResponseHandler<R,E>

Type Parameters:
R - Final response object type.
E - Entry type.
All Known Implementing Classes:
PagedCountingResponseHandler

public interface PagedResponseHandler<R,E>
Interface implemented by network protocol specific implementations (like HTTP/REST) to support response pagination using tokens.

Protocol specific implementations "tell" the backend (Nessie service implementations) whether a response entry fits in the current response page sent to the client or not via the result of the addEntry(Object) method.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addEntry(E entry)
    Add an entry to the response page builder.
    Produce the response page from a response page builder instance.
    void
    hasMore(String pagingToken)
    Called to indicate that there are more entries to retrieve using the given paging token.
  • Method Details

    • build

      R build()
      Produce the response page from a response page builder instance.
    • addEntry

      boolean addEntry(E entry)
      Add an entry to the response page builder.
      Parameters:
      entry - the entry to add
      Returns:
      true if entry could be added to the response page or false if not
    • hasMore

      void hasMore(String pagingToken)
      Called to indicate that there are more entries to retrieve using the given paging token.
      Parameters:
      pagingToken - paging token to be used to access the next page