Interface PageRequestHandler


  • public interface PageRequestHandler
    • Method Detail

      • createPageRequest

        Request createPageRequest​(Request.Builder requestBuilder,
                                  int offset,
                                  int limit)
        Returns:
        A request for a page of data starting from the offset and ending at the offset + limit
      • getTotalResponseCount

        <R extends IntRestResponse> int getTotalResponseCount​(R response)
        Returns:
        The total number of objects that can be retrieved from the endpoint from which this response originated
      • getCurrentResponseCount

        <R extends IntRestResponse> int getCurrentResponseCount​(R response)
        Returns:
        The number of objects in the current page of data
      • combineResponses

        <R extends IntRestResponse> R combineResponses​(java.util.Collection<R> pagedResponses)
        Returns:
        One response object representing the unification of all pages of data