@BetaApi(value="The surface for streaming is not stable yet and may change in the future.") public abstract class BidiStreamingCallable<RequestT,ResponseT> extends Object
It is considered advanced usage for a user to create a BidiStreamingCallable themselves. This class is intended to be created by a generated client class, and configured by instances of StreamingCallSettings.Builder which are exposed through the client settings class.
| Modifier | Constructor and Description |
|---|---|
protected |
BidiStreamingCallable() |
| Modifier and Type | Method and Description |
|---|---|
ApiStreamObserver<RequestT> |
bidiStreamingCall(ApiStreamObserver<ResponseT> responseObserver)
Conduct a bidirectional streaming call
|
abstract ApiStreamObserver<RequestT> |
bidiStreamingCall(ApiStreamObserver<ResponseT> responseObserver,
ApiCallContext context)
Conduct a bidirectional streaming call with the given
ApiCallContext. |
BidiStreamingCallable<RequestT,ResponseT> |
withDefaultCallContext(ApiCallContext defaultCallContext)
Returns a new
BidiStreamingCallable with an ApiCallContext that is used as a
default when none is supplied in individual calls. |
public abstract ApiStreamObserver<RequestT> bidiStreamingCall(ApiStreamObserver<ResponseT> responseObserver, ApiCallContext context)
ApiCallContext.responseObserver - ApiStreamObserver to observe the streaming responsescontext - ApiCallContext to provide context information for the RPC call.ApiStreamObserver which is used for making streaming requests.public ApiStreamObserver<RequestT> bidiStreamingCall(ApiStreamObserver<ResponseT> responseObserver)
responseObserver - ApiStreamObserver to observe the streaming responsesApiStreamObserver which is used for making streaming requests.public BidiStreamingCallable<RequestT,ResponseT> withDefaultCallContext(ApiCallContext defaultCallContext)
BidiStreamingCallable with an ApiCallContext that is used as a
default when none is supplied in individual calls.defaultCallContext - the default ApiCallContext.