@Test public void disablingInboundAutoFlowControlSuppressesRequestsForMoreMessages() throws Exception { final AtomicReference<ClientCall.Listener<String>> listener = new AtomicReference<ClientCall.Listener<String>>(); final List<Integer> requests = new ArrayList<>(); NoopClientCall<Integer, String> call = new NoopClientCall<Integer, String>() { @Override public void start(io.grpc.ClientCall.Listener<String> responseListener, Metadata headers) { listener.set(responseListener); } @Override public void request(int numMessages) { requests.add(numMessages); } }; ClientCalls.asyncBidiStreamingCall(call, new ClientResponseObserver<Integer, String>() { @Override public void beforeStart(ClientCallStreamObserver<Integer> requestStream) { requestStream.disableAutoInboundFlowControl(); } @Override public void onNext(String value) { } @Override public void onError(Throwable t) { } @Override public void onCompleted() { } }); listener.get().onMessage("message"); assertThat(requests).containsExactly(1); }
public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); }
ClientCalls { public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); } }
ClientCalls { public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); } private  ClientCalls(); }
ClientCalls { public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); } private  ClientCalls(); static void asyncUnaryCall(
      ClientCall<ReqT, RespT> call, ReqT req, StreamObserver<RespT> responseObserver); static void asyncServerStreamingCall(
      ClientCall<ReqT, RespT> call, ReqT req, StreamObserver<RespT> responseObserver); static StreamObserver<ReqT> asyncClientStreamingCall(
      ClientCall<ReqT, RespT> call,
      StreamObserver<RespT> responseObserver); static StreamObserver<ReqT> asyncBidiStreamingCall(
      ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver); static RespT blockingUnaryCall(ClientCall<ReqT, RespT> call, ReqT req); static RespT blockingUnaryCall(
      Channel channel, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, ReqT req); static Iterator<RespT> blockingServerStreamingCall(
      ClientCall<ReqT, RespT> call, ReqT req); static Iterator<RespT> blockingServerStreamingCall(
      Channel channel, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, ReqT req); static ListenableFuture<RespT> futureUnaryCall(
      ClientCall<ReqT, RespT> call, ReqT req); static Object getArgumentFromRequest(Object request); }
ClientCalls { public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); } private  ClientCalls(); static void asyncUnaryCall(
      ClientCall<ReqT, RespT> call, ReqT req, StreamObserver<RespT> responseObserver); static void asyncServerStreamingCall(
      ClientCall<ReqT, RespT> call, ReqT req, StreamObserver<RespT> responseObserver); static StreamObserver<ReqT> asyncClientStreamingCall(
      ClientCall<ReqT, RespT> call,
      StreamObserver<RespT> responseObserver); static StreamObserver<ReqT> asyncBidiStreamingCall(
      ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver); static RespT blockingUnaryCall(ClientCall<ReqT, RespT> call, ReqT req); static RespT blockingUnaryCall(
      Channel channel, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, ReqT req); static Iterator<RespT> blockingServerStreamingCall(
      ClientCall<ReqT, RespT> call, ReqT req); static Iterator<RespT> blockingServerStreamingCall(
      Channel channel, MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, ReqT req); static ListenableFuture<RespT> futureUnaryCall(
      ClientCall<ReqT, RespT> call, ReqT req); static Object getArgumentFromRequest(Object request);  }