public class StreamObserverSpliterator<T> extends Spliterators.AbstractSpliterator<T> implements io.grpc.stub.StreamObserver<T>
Spliterator
implementation that emits elements as they are received by the
gRPC client which calls into it with new data via StreamObserver
interface.Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
Constructor and Description |
---|
StreamObserverSpliterator() |
Modifier and Type | Method and Description |
---|---|
void |
onCompleted() |
void |
onError(Throwable throwable) |
void |
onNext(T t) |
Stream<T> |
stream() |
boolean |
tryAdvance(Consumer<? super T> action) |
characteristics, estimateSize, trySplit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
public Stream<T> stream()
Stream
that lazily binds to this Spliterator
when evaluated.public void onError(Throwable throwable)
onError
in interface io.grpc.stub.StreamObserver<T>
public void onCompleted()
onCompleted
in interface io.grpc.stub.StreamObserver<T>
public boolean tryAdvance(Consumer<? super T> action)
tryAdvance
in interface Spliterator<T>
Copyright © 2020 Red Hat. All rights reserved.