Class TransportTracer

java.lang.Object
io.grpc.internal.TransportTracer

public final class TransportTracer extends Object
A class for gathering statistics about a transport. This is an experimental feature. Can only be called from the transport thread unless otherwise noted.
  • Constructor Details

    • TransportTracer

      public TransportTracer()
  • Method Details

    • getStats

      Returns a read only set of current stats.
    • reportLocalStreamStarted

      public void reportLocalStreamStarted()
      Called by the client to report a stream has started.
    • reportRemoteStreamStarted

      public void reportRemoteStreamStarted()
      Called by the server to report a stream has started.
    • reportStreamClosed

      public void reportStreamClosed(boolean success)
      Reports that a stream closed with the specified Status.
    • reportMessageSent

      public void reportMessageSent(int numMessages)
      Reports that some messages were successfully sent. numMessages must be at least 0.
    • reportMessageReceived

      public void reportMessageReceived()
      Reports that a message was successfully received. This method is thread safe.
    • reportKeepAliveSent

      public void reportKeepAliveSent()
      Reports that a keep alive message was sent.
    • setFlowControlWindowReader

      public void setFlowControlWindowReader(TransportTracer.FlowControlReader flowControlWindowReader)
      Registers a TransportTracer.FlowControlReader that can be used to read the local and remote flow control window sizes.
    • getDefaultFactory

      public static TransportTracer.Factory getDefaultFactory()