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 with
StreamObserver
and it's common subclasses like
CallStreamObserver
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
Constructor Details
-
StreamObservers
public StreamObservers()Deprecated.
-
-
Method Details
-
copyWithFlowControl
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
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.
-