public abstract class ForwardingCallListener<RespT> extends Call.Listener<RespT>
Call.Listener which forwards all of its methods to another Call.Listener.| Modifier and Type | Class and Description |
|---|---|
static class |
ForwardingCallListener.SimpleForwardingCallListener<RespT>
A simplified version of
ForwardingCallListener where subclasses can pass in a Call.Listener as the delegate. |
| Constructor and Description |
|---|
ForwardingCallListener() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Call.Listener<RespT> |
delegate()
Returns the delegated
Call.Listener. |
void |
onClose(Status status,
Metadata.Trailers trailers)
The Call has been closed.
|
void |
onHeaders(Metadata.Headers headers)
The response headers have been received.
|
void |
onPayload(RespT payload)
A response payload has been received.
|
void |
onReady()
This indicates that the Call is now capable of sending additional messages (via
Call.sendPayload(RequestT)) without requiring excessive buffering internally. |
protected abstract Call.Listener<RespT> delegate()
Call.Listener.public void onHeaders(Metadata.Headers headers)
Call.ListenerMetadata
is passed.onHeaders in class Call.Listener<RespT>headers - containing metadata sent by the server at the start of the response.public void onPayload(RespT payload)
Call.ListeneronPayload in class Call.Listener<RespT>payload - returned by the serverpublic void onClose(Status status, Metadata.Trailers trailers)
Call.Listenerstatus is
not equal to Status.OK, 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 Call.Listener<RespT>status - the result of the remote call.trailers - metadata provided at call completion.public void onReady()
Call.ListenerCall.sendPayload(RequestT)) 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 Call.onReady in class Call.Listener<RespT>