Package io.grpc.stub
Class MetadataUtils.MetadataCapturingClientInterceptor.MetadataCapturingClientCall.MetadataCapturingClientCallListener
- java.lang.Object
-
- io.grpc.ClientCall.Listener<RespT>
-
- io.grpc.PartialForwardingClientCallListener<RespT>
-
- io.grpc.ForwardingClientCallListener<RespT>
-
- io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>
-
- io.grpc.stub.MetadataUtils.MetadataCapturingClientInterceptor.MetadataCapturingClientCall.MetadataCapturingClientCallListener
-
- Enclosing class:
- MetadataUtils.MetadataCapturingClientInterceptor.MetadataCapturingClientCall<ReqT,RespT>
private final class MetadataUtils.MetadataCapturingClientInterceptor.MetadataCapturingClientCall.MetadataCapturingClientCallListener extends ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.grpc.ForwardingClientCallListener
ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>
-
-
Constructor Summary
Constructors Constructor Description MetadataCapturingClientCallListener(ClientCall.Listener<RespT> responseListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onClose(Status status, Metadata trailers)
The ClientCall has been closed.void
onHeaders(Metadata headers)
The response headers have been received.-
Methods inherited from class io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener
delegate
-
Methods inherited from class io.grpc.ForwardingClientCallListener
onMessage
-
Methods inherited from class io.grpc.PartialForwardingClientCallListener
onReady, toString
-
-
-
-
Constructor Detail
-
MetadataCapturingClientCallListener
MetadataCapturingClientCallListener(ClientCall.Listener<RespT> responseListener)
-
-
Method Detail
-
onHeaders
public void onHeaders(Metadata headers)
Description copied from class:ClientCall.Listener
The response headers have been received. Headers always precede messages.Since
Metadata
is not thread-safe, the caller must not access (read or write)headers
after this point.- Overrides:
onHeaders
in classPartialForwardingClientCallListener<RespT>
- Parameters:
headers
- containing metadata sent by the server at the start of the response.
-
onClose
public void onClose(Status status, Metadata trailers)
Description copied from class:ClientCall.Listener
The ClientCall has been closed. Any additional calls to theClientCall
will not be processed by the server. No further receiving will occur and no further notifications will be made.Since
Metadata
is not thread-safe, the caller must not access (read or write)trailers
after this point.If
status
returns false forStatus.isOk()
, then the call failed. An additional block of trailer metadata may be received at the end of the call from the server. An emptyMetadata
object is passed if no trailers are received.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.
- Overrides:
onClose
in classPartialForwardingClientCallListener<RespT>
- Parameters:
status
- the result of the remote call.trailers
- metadata provided at call completion.
-
-