Package io.grpc
Class ClientStreamTracer
- java.lang.Object
-
- io.grpc.StreamTracer
-
- io.grpc.ClientStreamTracer
-
- Direct Known Subclasses:
ForwardingClientStreamTracer
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2861") @ThreadSafe public abstract class ClientStreamTracer extends StreamTracer
StreamTracer
for the client-side.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientStreamTracer.Factory
Factory class forClientStreamTracer
.static class
ClientStreamTracer.StreamInfo
Information about a stream.
-
Field Summary
Fields Modifier and Type Field Description static CallOptions.Key<java.lang.Boolean>
NAME_RESOLUTION_DELAYED
The call was delayed due to waiting for name resolution result.
-
Constructor Summary
Constructors Constructor Description ClientStreamTracer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createPendingStream()
Name resolution is completed and the connection starts getting established.void
inboundHeaders()
Headers has been received from the server.void
inboundTrailers(Metadata trailers)
Trailing metadata has been received from the server.void
outboundHeaders()
Headers has been sent to the socket.void
streamCreated(Attributes transportAttrs, Metadata headers)
The stream is being created on a ready transport.-
Methods inherited from class io.grpc.StreamTracer
inboundMessage, inboundMessageRead, inboundUncompressedSize, inboundWireSize, outboundMessage, outboundMessageSent, outboundUncompressedSize, outboundWireSize, streamClosed
-
-
-
-
Field Detail
-
NAME_RESOLUTION_DELAYED
public static final CallOptions.Key<java.lang.Boolean> NAME_RESOLUTION_DELAYED
The call was delayed due to waiting for name resolution result.
-
-
Method Detail
-
streamCreated
public void streamCreated(@TransportAttr Attributes transportAttrs, Metadata headers)
The stream is being created on a ready transport.- Parameters:
headers
- the mutable initial metadata. Modifications to it will be sent to the socket but not be seen by client interceptors and the application.- Since:
- 1.40.0
-
createPendingStream
public void createPendingStream()
Name resolution is completed and the connection starts getting established. This method is only invoked on the streams that encounter such delay. gRPC buffers the client call if the remote address and configurations, e.g. timeouts and retry policy, are not ready. Asynchronously gRPC internally does the name resolution to get this information. The streams that are processed immediately on ready transports by the time the RPC comes do not go through the pending process, thus this callback will not be invoked.
-
outboundHeaders
public void outboundHeaders()
Headers has been sent to the socket.
-
inboundHeaders
public void inboundHeaders()
Headers has been received from the server.
-
inboundTrailers
public void inboundTrailers(Metadata trailers)
Trailing metadata has been received from the server.- Parameters:
trailers
- the mutable trailing metadata. Modifications to it will be seen by interceptors and the application.- Since:
- 1.17.0
-
-