Interface PageRequestHandler
-
public interface PageRequestHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R extends IntRestResponse>
RcombineResponses(java.util.Collection<R> pagedResponses)RequestcreatePageRequest(Request.Builder requestBuilder, int offset, int limit)<R extends IntRestResponse>
intgetCurrentResponseCount(R response)<R extends IntRestResponse>
intgetTotalResponseCount(R response)
-
-
-
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
-
-