@BetaApi("The surface for streaming is not stable yet and may change in the future.")
public static <RequestT, ResponseT>
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
StreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
ClientContext clientContext) {
BidiStreamingCallable<RequestT, ResponseT> callable =
new GrpcDirectBidiStreamingCallable<>(grpcCallSettings.getMethodDescriptor());
callable =
new GrpcExceptionBidiStreamingCallable<>(callable, ImmutableSet.<StatusCode.Code>of());
callable =
new TracedBidiCallable<>(
callable,
clientContext.getTracerFactory(),
getSpanName(grpcCallSettings.getMethodDescriptor()));
return callable.withDefaultCallContext(clientContext.getDefaultCallContext());
}