public final class PaginationUtils extends Object
PaginatedResponses and those containing lists of Resources.| Modifier and Type | Method and Description |
|---|---|
static <U extends PaginatedResponse<?>> |
requestPages(Function<Integer,Mono<U>> pageSupplier)
Generate the stream of responses starting from page 1 of an initial paginated response.
|
static <R extends Resource<?>,U extends PaginatedResponse<R>> |
requestResources(Function<Integer,Mono<U>> pageSupplier)
Generate the stream of resources accumulated from a series of responses obtained from the page supplier.
|
public static <U extends PaginatedResponse<?>> Flux<U> requestPages(Function<Integer,Mono<U>> pageSupplier)
U - the type of PaginatedResponse.pageSupplier - a function from integers to Monos of PaginatedResponses.U objects.public static <R extends Resource<?>,U extends PaginatedResponse<R>> Flux<R> requestResources(Function<Integer,Mono<U>> pageSupplier)
R - the type of resource in the list on each PaginatedResponse.U - the type of PaginatedResponse.pageSupplier - a function from integers to Monos of PaginatedResponses.R objects.Copyright © 2016 Pivotal Software, Inc.. All rights reserved.