Class TestStreamTracer.TestBaseStreamTracer

java.lang.Object
io.grpc.StreamTracer
io.grpc.internal.testing.TestStreamTracer.TestBaseStreamTracer
All Implemented Interfaces:
TestStreamTracer
Enclosing interface:
TestStreamTracer

public static class TestStreamTracer.TestBaseStreamTracer extends io.grpc.StreamTracer implements TestStreamTracer
A StreamTracer suitable for testing.
  • Field Details

  • Constructor Details

    • TestBaseStreamTracer

      public TestBaseStreamTracer()
  • Method Details

    • await

      public void await() throws InterruptedException
      Description copied from interface: TestStreamTracer
      Waits for the stream to be done.
      Specified by:
      await in interface TestStreamTracer
      Throws:
      InterruptedException
    • await

      public boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException
      Description copied from interface: TestStreamTracer
      Waits for the stream to be done.
      Specified by:
      await in interface TestStreamTracer
      Throws:
      InterruptedException
    • getStatus

      public io.grpc.Status getStatus()
      Description copied from interface: TestStreamTracer
      Returns the status passed to StreamTracer.streamClosed(io.grpc.Status).
      Specified by:
      getStatus in interface TestStreamTracer
    • getInboundWireSize

      public long getInboundWireSize()
      Description copied from interface: TestStreamTracer
      Returns to sum of all sizes passed to StreamTracer.inboundWireSize(long).
      Specified by:
      getInboundWireSize in interface TestStreamTracer
    • getInboundUncompressedSize

      public long getInboundUncompressedSize()
      Description copied from interface: TestStreamTracer
      Returns to sum of all sizes passed to StreamTracer.inboundUncompressedSize(long).
      Specified by:
      getInboundUncompressedSize in interface TestStreamTracer
    • getOutboundWireSize

      public long getOutboundWireSize()
      Description copied from interface: TestStreamTracer
      Returns to sum of all sizes passed to StreamTracer.outboundWireSize(long).
      Specified by:
      getOutboundWireSize in interface TestStreamTracer
    • getOutboundUncompressedSize

      public long getOutboundUncompressedSize()
      Description copied from interface: TestStreamTracer
      Returns to sum of al sizes passed to StreamTracer.outboundUncompressedSize(long).
      Specified by:
      getOutboundUncompressedSize in interface TestStreamTracer
    • outboundWireSize

      public void outboundWireSize(long bytes)
      Overrides:
      outboundWireSize in class io.grpc.StreamTracer
    • inboundWireSize

      public void inboundWireSize(long bytes)
      Overrides:
      inboundWireSize in class io.grpc.StreamTracer
    • outboundUncompressedSize

      public void outboundUncompressedSize(long bytes)
      Overrides:
      outboundUncompressedSize in class io.grpc.StreamTracer
    • inboundUncompressedSize

      public void inboundUncompressedSize(long bytes)
      Overrides:
      inboundUncompressedSize in class io.grpc.StreamTracer
    • streamClosed

      public void streamClosed(io.grpc.Status status)
      Overrides:
      streamClosed in class io.grpc.StreamTracer
    • inboundMessage

      public void inboundMessage(int seqNo)
      Overrides:
      inboundMessage in class io.grpc.StreamTracer
    • outboundMessage

      public void outboundMessage(int seqNo)
      Overrides:
      outboundMessage in class io.grpc.StreamTracer
    • outboundMessageSent

      public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Overrides:
      outboundMessageSent in class io.grpc.StreamTracer
    • inboundMessageRead

      public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Overrides:
      inboundMessageRead in class io.grpc.StreamTracer
    • setFailDuplicateCallbacks

      public void setFailDuplicateCallbacks(boolean fail)
      Description copied from interface: TestStreamTracer
      Sets whether to fail on unexpected duplicate calls to callback methods.
      Specified by:
      setFailDuplicateCallbacks in interface TestStreamTracer
    • nextOutboundEvent

      public String nextOutboundEvent()
      Description copied from interface: TestStreamTracer
      Returns the next captured outbound message event.
      Specified by:
      nextOutboundEvent in interface TestStreamTracer
    • nextInboundEvent

      public String nextInboundEvent()
      Description copied from interface: TestStreamTracer
      Returns the next captured outbound message event.
      Specified by:
      nextInboundEvent in interface TestStreamTracer