From 9dfe10e7745730ce5762ccf5de0ff6f46e303fd3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 13 Apr 2018 11:36:30 -0700 Subject: [PATCH 1/2] stub: add docs clarifying readiness --- core/src/main/java/io/grpc/ClientCall.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/java/io/grpc/ClientCall.java b/core/src/main/java/io/grpc/ClientCall.java index a0d995022cf..bccf426773b 100644 --- a/core/src/main/java/io/grpc/ClientCall.java +++ b/core/src/main/java/io/grpc/ClientCall.java @@ -141,6 +141,10 @@ public void onClose(Status status, Metadata trailers) {} * {@link #sendMessage}) without requiring excessive buffering internally. This event is * just a suggestion and the application is free to ignore it, however doing so may * result in excessive buffering within the ClientCall. + * + *

If the type of a call is either {@link MethodDescriptor.MethodType#UNARY} or + * {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this callback may not be fired. Calls + * that send exactly one message should not await this callback. */ public void onReady() {} } @@ -223,6 +227,10 @@ public void onReady() {} * *

This abstract class's implementation always returns {@code true}. Implementations generally * override the method. + * + *

If the type of the call is either {@link MethodDescriptor.MethodType#UNARY} or + * {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this method may return false. Calls that + * send exactly one message should not check this method. */ public boolean isReady() { return true; From c506b56fa56ee4173690c12086fa90520e9e151e Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Fri, 13 Apr 2018 12:49:37 -0700 Subject: [PATCH 2/2] comments --- core/src/main/java/io/grpc/ClientCall.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/grpc/ClientCall.java b/core/src/main/java/io/grpc/ClientCall.java index bccf426773b..6be55842015 100644 --- a/core/src/main/java/io/grpc/ClientCall.java +++ b/core/src/main/java/io/grpc/ClientCall.java @@ -229,8 +229,8 @@ public void onReady() {} * override the method. * *

If the type of the call is either {@link MethodDescriptor.MethodType#UNARY} or - * {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this method may return false. Calls that - * send exactly one message should not check this method. + * {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this method may persistently return + * false. Calls that send exactly one message should not check this method. */ public boolean isReady() { return true;