Package com.azure.android.core.util
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CancellationTokenforEach(AsyncStreamHandler<T> handler)Enumerate theAsyncStreamby signaling each element to thehandler.onNext.
-
-
-
Method Detail
-
forEach
CancellationToken forEach(AsyncStreamHandler<T> handler)
Enumerate theAsyncStreamby signaling each element to thehandler.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.
-
-