Class ForwardingHttpJsonClientCallListener<ResponseT> (2.35.0)

public abstract class ForwardingHttpJsonClientCallListener<ResponseT> extends HttpJsonClientCall.Listener<ResponseT>

A HttpJsonClientCall.Listener which forwards all of its methods to another HttpJsonClientCall.Listener.

Inheritance

java.lang.Object > HttpJsonClientCall.Listener > ForwardingHttpJsonClientCallListener<ResponseT>

Type Parameter

NameDescription
ResponseT

Constructors

ForwardingHttpJsonClientCallListener()

public ForwardingHttpJsonClientCallListener()

Methods

delegate()

protected abstract HttpJsonClientCall.Listener<ResponseT> delegate()
Returns
TypeDescription
Listener<ResponseT>

onClose(int statusCode, HttpJsonMetadata trailers)

public void onClose(int statusCode, HttpJsonMetadata trailers)

The ClientCall has been closed. Any additional calls to the ClientCall 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.

Parameters
NameDescription
statusCodeint
trailersHttpJsonMetadata
Overrides

onHeaders(HttpJsonMetadata responseHeaders)

public void onHeaders(HttpJsonMetadata responseHeaders)

The response headers have been received. Headers always precede messages.

Parameter
NameDescription
responseHeadersHttpJsonMetadata
Overrides

onMessage(ResponseT message)

public void onMessage(ResponseT message)

A response message has been received. May be called zero or more times depending on whether the call response is empty, a single message or a stream of messages.

Parameter
NameDescription
messageResponseT
Overrides