Class ForwardingClientStreamTracer

java.lang.Object
io.grpc.StreamTracer
io.grpc.ClientStreamTracer
io.grpc.internal.ForwardingClientStreamTracer

public abstract class ForwardingClientStreamTracer extends ClientStreamTracer
  • Constructor Details

    • ForwardingClientStreamTracer

      public ForwardingClientStreamTracer()
  • Method Details

    • delegate

      protected abstract ClientStreamTracer delegate()
      Returns the underlying ClientStreamTracer.
    • streamCreated

      public void streamCreated(Attributes transportAttrs, Metadata headers)
      Description copied from class: ClientStreamTracer
      The stream is being created on a ready transport.
      Overrides:
      streamCreated in class ClientStreamTracer
      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.
    • createPendingStream

      public void createPendingStream()
      Description copied from class: ClientStreamTracer
      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.
      Overrides:
      createPendingStream in class ClientStreamTracer
    • outboundHeaders

      public void outboundHeaders()
      Description copied from class: ClientStreamTracer
      Headers has been sent to the socket.
      Overrides:
      outboundHeaders in class ClientStreamTracer
    • inboundHeaders

      public void inboundHeaders()
      Description copied from class: ClientStreamTracer
      Headers has been received from the server.
      Overrides:
      inboundHeaders in class ClientStreamTracer
    • inboundHeaders

      public void inboundHeaders(Metadata headers)
      Description copied from class: ClientStreamTracer
      Headers has been received from the server. This method does not pass ownership to headers, so implementations must not access the metadata after returning. Modifications to the metadata within this method will be seen by interceptors and the application.
      Overrides:
      inboundHeaders in class ClientStreamTracer
      Parameters:
      headers - the received header metadata
    • inboundTrailers

      public void inboundTrailers(Metadata trailers)
      Description copied from class: ClientStreamTracer
      Trailing metadata has been received from the server. This method does not pass ownership to trailers, so implementations must not access the metadata after returning. Modifications to the metadata within this method will be seen by interceptors and the application.
      Overrides:
      inboundTrailers in class ClientStreamTracer
      Parameters:
      trailers - the received trailing metadata
    • addOptionalLabel

      public void addOptionalLabel(String key, String value)
      Description copied from class: ClientStreamTracer
      Information providing context to the call became available.
      Overrides:
      addOptionalLabel in class ClientStreamTracer
    • streamClosed

      public void streamClosed(Status status)
      Description copied from class: StreamTracer
      Stream is closed. This will be called exactly once.
      Overrides:
      streamClosed in class StreamTracer
    • outboundMessage

      public void outboundMessage(int seqNo)
      Description copied from class: StreamTracer
      An outbound message has been passed to the stream. This is called as soon as the stream knows about the message, but doesn't have further guarantee such as whether the message is serialized or not.
      Overrides:
      outboundMessage in class StreamTracer
      Parameters:
      seqNo - the sequential number of the message within the stream, starting from 0. It can be used to correlate with StreamTracer.outboundMessageSent(int, long, long) for the same message.
    • inboundMessage

      public void inboundMessage(int seqNo)
      Description copied from class: StreamTracer
      An inbound message has been received by the stream. This is called as soon as the stream knows about the message, but doesn't have further guarantee such as whether the message is deserialized or not.
      Overrides:
      inboundMessage in class StreamTracer
      Parameters:
      seqNo - the sequential number of the message within the stream, starting from 0. It can be used to correlate with StreamTracer.inboundMessageRead(int, long, long) for the same message.
    • outboundMessageSent

      public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Description copied from class: StreamTracer
      An outbound message has been serialized and sent to the transport.
      Overrides:
      outboundMessageSent in class StreamTracer
      Parameters:
      seqNo - the sequential number of the message within the stream, starting from 0. It can be used to correlate with StreamTracer.outboundMessage(int) for the same message.
      optionalWireSize - the wire size of the message. -1 if unknown
      optionalUncompressedSize - the uncompressed serialized size of the message. -1 if unknown
    • inboundMessageRead

      public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Description copied from class: StreamTracer
      An inbound message has been fully read from the transport.
      Overrides:
      inboundMessageRead in class StreamTracer
      Parameters:
      seqNo - the sequential number of the message within the stream, starting from 0. It can be used to correlate with StreamTracer.inboundMessage(int) for the same message.
      optionalWireSize - the wire size of the message. -1 if unknown
      optionalUncompressedSize - the uncompressed serialized size of the message. -1 if unknown
    • outboundWireSize

      public void outboundWireSize(long bytes)
      Description copied from class: StreamTracer
      The wire size of some outbound data is revealed. This can only used to record the accumulative outbound wire size. There is no guarantee wrt timing or granularity of this method.
      Overrides:
      outboundWireSize in class StreamTracer
    • outboundUncompressedSize

      public void outboundUncompressedSize(long bytes)
      Description copied from class: StreamTracer
      The uncompressed size of some outbound data is revealed. This can only used to record the accumulative outbound uncompressed size. There is no guarantee wrt timing or granularity of this method.
      Overrides:
      outboundUncompressedSize in class StreamTracer
    • inboundWireSize

      public void inboundWireSize(long bytes)
      Description copied from class: StreamTracer
      The wire size of some inbound data is revealed. This can only be used to record the accumulative received wire size. There is no guarantee wrt timing or granularity of this method.
      Overrides:
      inboundWireSize in class StreamTracer
    • inboundUncompressedSize

      public void inboundUncompressedSize(long bytes)
      Description copied from class: StreamTracer
      The uncompressed size of some inbound data is revealed. This can only used to record the accumulative received uncompressed size. There is no guarantee wrt timing or granularity of this method.
      Overrides:
      inboundUncompressedSize in class StreamTracer
    • toString

      public String toString()
      Overrides:
      toString in class Object