@BetaApi public abstract class ForwardingHttpJsonClientCallListener<ResponseT> extends HttpJsonClientCall.Listener<ResponseT>
HttpJsonClientCall.Listener which forwards all of its methods to another HttpJsonClientCall.Listener.| Modifier and Type | Class and Description |
|---|---|
static class |
ForwardingHttpJsonClientCallListener.SimpleForwardingHttpJsonClientCallListener<ResponseT>
A simplified version of
ForwardingHttpJsonClientCallListener where subclasses can pass
in a HttpJsonClientCall.Listener as the delegate. |
| Constructor and Description |
|---|
ForwardingHttpJsonClientCallListener() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract HttpJsonClientCall.Listener<ResponseT> |
delegate() |
void |
onClose(int statusCode,
HttpJsonMetadata trailers)
The ClientCall has been closed.
|
void |
onHeaders(HttpJsonMetadata responseHeaders)
The response headers have been received.
|
void |
onMessage(ResponseT message)
A response message has been received.
|
public ForwardingHttpJsonClientCallListener()
protected abstract HttpJsonClientCall.Listener<ResponseT> delegate()
public void onHeaders(HttpJsonMetadata responseHeaders)
HttpJsonClientCall.ListeneronHeaders in class HttpJsonClientCall.Listener<ResponseT>responseHeaders - containing metadata sent by the server at the start of the responsepublic void onMessage(ResponseT message)
HttpJsonClientCall.ListeneronMessage in class HttpJsonClientCall.Listener<ResponseT>message - returned by the serverpublic void onClose(int statusCode,
HttpJsonMetadata trailers)
HttpJsonClientCall.ListenerClientCall will not be
processed by the server. No further receiving will occur and no further notifications will be
made.
This method should not throw. If this method throws, there is no way to be notified of the exception. Implementations should therefore be careful of exceptions which can accidentally leak resources.
onClose in class HttpJsonClientCall.Listener<ResponseT>statusCode - the HTTP status code representing the result of the remote calltrailers - metadata provided at call completion