Interface AsyncStream<T>

  • Type Parameters:
    T - The element type.
    All Known Subinterfaces:
    PagedAsyncStreamCore<C,​T,​P>

    public interface AsyncStream<T>
    A sequence of elements that can be enumerated asynchronously.
    • Method Detail

      • forEach

        CancellationToken forEach​(AsyncStreamHandler<T> handler)
        Enumerate the AsyncStream by signaling each element to the handler.onNext. All the elements will be enumerated as long as there is no cancellation requested and there is no error while retrieving the element (e.g. auth error, network error).
        Parameters:
        handler - The handler to receive result of enumeration.
        Returns:
        CancellationToken to request the cancellation of enumeration.