@Test public void disablingInboundAutoFlowControlSuppressesRequestsForMoreMessages() throws Exception { ServerCallHandler<Integer, Integer> callHandler = ServerCalls.asyncBidiStreamingCall( new ServerCalls.BidiStreamingMethod<Integer, Integer>() { @Override public StreamObserver<Integer> invoke(StreamObserver<Integer> responseObserver) { ServerCallStreamObserver<Integer> serverCallObserver = (ServerCallStreamObserver<Integer>) responseObserver; serverCallObserver.disableAutoInboundFlowControl(); return new ServerCalls.NoopStreamObserver<Integer>(); } }); ServerCall.Listener<Integer> callListener = callHandler.startCall(STREAMING_METHOD, serverCall, new Metadata()); callListener.onReady(); callListener.onMessage(1); Mockito.verify(serverCall, times(0)).request(1); }
public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall( final BidiStreamingMethod<ReqT, RespT> method) { return asyncStreamingRequestCall(method); }
ServerCalls { public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall( final BidiStreamingMethod<ReqT, RespT> method) { return asyncStreamingRequestCall(method); } }
ServerCalls { public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall( final BidiStreamingMethod<ReqT, RespT> method) { return asyncStreamingRequestCall(method); } private  ServerCalls(); }
ServerCalls { public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall( final BidiStreamingMethod<ReqT, RespT> method) { return asyncStreamingRequestCall(method); } private  ServerCalls(); static ServerCallHandler<ReqT, RespT> asyncUnaryCall(
      final UnaryMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncServerStreamingCall(
      final ServerStreamingMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncClientStreamingCall(
      final ClientStreamingMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall(
      final BidiStreamingMethod<ReqT, RespT> method); static void asyncUnimplementedUnaryCall(MethodDescriptor<?, ?> methodDescriptor,
      StreamObserver<?> responseObserver); static StreamObserver<T> asyncUnimplementedStreamingCall(
      MethodDescriptor<?, ?> methodDescriptor, StreamObserver<?> responseObserver); }
ServerCalls { public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall( final BidiStreamingMethod<ReqT, RespT> method) { return asyncStreamingRequestCall(method); } private  ServerCalls(); static ServerCallHandler<ReqT, RespT> asyncUnaryCall(
      final UnaryMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncServerStreamingCall(
      final ServerStreamingMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncClientStreamingCall(
      final ClientStreamingMethod<ReqT, RespT> method); static ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall(
      final BidiStreamingMethod<ReqT, RespT> method); static void asyncUnimplementedUnaryCall(MethodDescriptor<?, ?> methodDescriptor,
      StreamObserver<?> responseObserver); static StreamObserver<T> asyncUnimplementedStreamingCall(
      MethodDescriptor<?, ?> methodDescriptor, StreamObserver<?> responseObserver);  }