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 withStreamObserverand 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> voidcopyWithFlowControl(Iterable<V> source, CallStreamObserver<V> target)Deprecated.Copy the values of anIterableto the targetCallStreamObserverwhile properly accounting for outbound flow-control.static <V> voidcopyWithFlowControl(Iterator<V> source, CallStreamObserver<V> target)Deprecated.Copy the values of anIteratorto the targetCallStreamObserverwhile 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 anIteratorto the targetCallStreamObserverwhile properly accounting for outbound flow-control. After calling this method,targetshould 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-CallStreamObserverwhich accepts values from the source.
-
copyWithFlowControl
public static <V> void copyWithFlowControl(Iterable<V> source, CallStreamObserver<V> target)
Deprecated.Copy the values of anIterableto the targetCallStreamObserverwhile properly accounting for outbound flow-control. After calling this method,targetshould 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-CallStreamObserverwhich accepts values from the source.
-
-