public abstract static class ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT> extends ForwardingClientCallListener<RespT>
ForwardingClientCallListener where subclasses can pass in a
ClientCall.Listener as the delegate.ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>| Modifier | Constructor and Description |
|---|---|
protected |
SimpleForwardingClientCallListener(ClientCall.Listener<RespT> delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected ClientCall.Listener<RespT> |
delegate()
Returns the delegated
ClientCall.Listener. |
void |
onClose(Status status,
Metadata trailers)
The ClientCall has been closed.
|
void |
onHeaders(Metadata headers)
The response headers have been received.
|
void |
onReady()
This indicates that the ClientCall is now capable of sending additional messages (via
ClientCall.sendMessage(ReqT)) without requiring excessive buffering internally. |
onMessageprotected SimpleForwardingClientCallListener(ClientCall.Listener<RespT> delegate)
protected ClientCall.Listener<RespT> delegate()
ForwardingClientCallListenerClientCall.Listener.delegate in class ForwardingClientCallListener<RespT>public void onHeaders(Metadata headers)
ClientCall.ListeneronHeaders in class ClientCall.Listener<RespT>headers - containing metadata sent by the server at the start of the response.public void onClose(Status status, Metadata trailers)
ClientCall.ListenerClientCall will not be
processed by the server. No further receiving will occur and no further notifications will be
made.
If status returns false for Status.isOk(), then the call failed.
An additional block of trailer metadata may be received at the end of the call from the
server. An empty Metadata object is passed if no trailers are received.
onClose in class ClientCall.Listener<RespT>status - the result of the remote call.trailers - metadata provided at call completion.public void onReady()
ClientCall.ListenerClientCall.sendMessage(ReqT)) 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.onReady in class ClientCall.Listener<RespT>