Skip to content

Commit e4502ac

Browse files
stub: add docs clarifying readiness
1 parent 1d5ed78 commit e4502ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/src/main/java/io/grpc/ClientCall.java

+8
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ public void onClose(Status status, Metadata trailers) {}
141141
* {@link #sendMessage}) without requiring excessive buffering internally. This event is
142142
* just a suggestion and the application is free to ignore it, however doing so may
143143
* result in excessive buffering within the ClientCall.
144+
*
145+
* <p>If the type of a call is either {@link MethodDescriptor.MethodType#UNARY} or
146+
* {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this callback may not be fired. Calls
147+
* that send exactly one message should not await this callback.
144148
*/
145149
public void onReady() {}
146150
}
@@ -223,6 +227,10 @@ public void onReady() {}
223227
*
224228
* <p>This abstract class's implementation always returns {@code true}. Implementations generally
225229
* override the method.
230+
*
231+
* <p>If the type of the call is either {@link MethodDescriptor.MethodType#UNARY} or
232+
* {@link MethodDescriptor.MethodType#SERVER_STREAMING}, this method may persistently return
233+
* false. Calls that send exactly one message should not check this method.
226234
*/
227235
public boolean isReady() {
228236
return true;

0 commit comments

Comments
 (0)