Package io.grpc.stub
Class StreamObservers
- java.lang.Object
-
- io.grpc.stub.StreamObservers
-
@Deprecated @ExperimentalApi("https://github.com/grpc/grpc-java/issues/4694") public final class StreamObservers extends Object
Deprecated.Of questionable utility and generally not used.Utility functions for working withStreamObserver
and it's common subclasses likeCallStreamObserver
.
-
-
Constructor Summary
Constructors Constructor Description StreamObservers()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <V> void
copyWithFlowControl(Iterable<V> source, CallStreamObserver<V> target)
Deprecated.Copy the values of anIterable
to the targetCallStreamObserver
while properly accounting for outbound flow-control.static <V> void
copyWithFlowControl(Iterator<V> source, CallStreamObserver<V> target)
Deprecated.Copy the values of anIterator
to the targetCallStreamObserver
while properly accounting for outbound flow-control.
-
-
-
Method Detail
-
copyWithFlowControl
public static <V> void copyWithFlowControl(Iterator<V> source, CallStreamObserver<V> target)
Deprecated.Copy the values of anIterator
to the targetCallStreamObserver
while properly accounting for outbound flow-control. After calling this method,target
should no longer be used.For clients this method is safe to call inside
ClientResponseObserver.beforeStart(io.grpc.stub.ClientCallStreamObserver<ReqT>)
, on servers it is safe to call inside the service method implementation.- Parameters:
source
- of values expressed as anIterator
.target
-CallStreamObserver
which accepts values from the source.
-
copyWithFlowControl
public static <V> void copyWithFlowControl(Iterable<V> source, CallStreamObserver<V> target)
Deprecated.Copy the values of anIterable
to the targetCallStreamObserver
while properly accounting for outbound flow-control. After calling this method,target
should no longer be used.For clients this method is safe to call inside
ClientResponseObserver.beforeStart(io.grpc.stub.ClientCallStreamObserver<ReqT>)
, on servers it is safe to call inside the service method implementation.- Parameters:
source
- of values expressed as anIterable
.target
-CallStreamObserver
which accepts values from the source.
-
-