C
- The continuation token type.T
- The type of element in the page.P
- The type of the page.public interface PagedAsyncStreamCore<C,T,P extends Page<C,T>> extends AsyncStream<T>
Modifier and Type | Method and Description |
---|---|
AsyncStream<P> |
byPage()
Gets
AsyncStream that enables enumerating the pages asynchronously. |
AsyncStream<P> |
byPage(C startPageId)
Gets
AsyncStream that enables enumerating the pages asynchronously,
starting from the page with the given id startPageId . |
AsyncStream<T> |
from(C startPageId)
Gets
AsyncStream that enables enumerating the elements of pages asynchronously,
starting from the page with the given id startPageId . |
void |
getPage(java.lang.String pageId,
BiConsumer<P,java.lang.Throwable> resultHandler)
Retrieve a page with given id
pageId . |
forEach
AsyncStream<P> byPage()
AsyncStream
that enables enumerating the pages asynchronously.AsyncStream
of pages.AsyncStream<P> byPage(C startPageId)
AsyncStream
that enables enumerating the pages asynchronously,
starting from the page with the given id startPageId
.startPageId
- The id of the page to start the enumeration from.AsyncStream
of pages.AsyncStream<T> from(C startPageId)
AsyncStream
that enables enumerating the elements of pages asynchronously,
starting from the page with the given id startPageId
.startPageId
- The id of the page to start the enumeration from.AsyncStream
of page elements.void getPage(java.lang.String pageId, BiConsumer<P,java.lang.Throwable> resultHandler)
pageId
. A null
value for pageId
indicate the initial page.pageId
- The id of the page to retrieve.resultHandler
- The handler to signal the retrieved page or any error during the page retrieval.