Class TestServerStreamTracer

  • All Implemented Interfaces:
    TestStreamTracer

    public class TestServerStreamTracer
    extends io.grpc.ServerStreamTracer
    implements TestStreamTracer
    A ServerStreamTracer suitable for testing.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.grpc.ServerStreamTracer

        io.grpc.ServerStreamTracer.Factory, io.grpc.ServerStreamTracer.ServerCallInfo<ReqT extends java.lang.Object,​RespT extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void await()
      Waits for the stream to be done.
      boolean await​(long timeout, java.util.concurrent.TimeUnit timeUnit)
      Waits for the stream to be done.
      long getInboundUncompressedSize()
      Returns to sum of all sizes passed to StreamTracer.inboundUncompressedSize(long).
      long getInboundWireSize()
      Returns to sum of all sizes passed to StreamTracer.inboundWireSize(long).
      long getOutboundUncompressedSize()
      Returns to sum of al sizes passed to StreamTracer.outboundUncompressedSize(long).
      long getOutboundWireSize()
      Returns to sum of all sizes passed to StreamTracer.outboundWireSize(long).
      io.grpc.ServerStreamTracer.ServerCallInfo<?,​?> getServerCallInfo()
      Returns the ServerCall passed to ServerStreamTracer.serverCallStarted(io.grpc.ServerStreamTracer.ServerCallInfo<?, ?>).
      io.grpc.Status getStatus()
      Returns the status passed to StreamTracer.streamClosed(io.grpc.Status).
      void inboundMessage​(int seqNo)  
      void inboundMessageRead​(int seqNo, long optionalWireSize, long optionalUncompressedSize)  
      void inboundUncompressedSize​(long bytes)  
      void inboundWireSize​(long bytes)  
      java.lang.String nextInboundEvent()
      Returns the next captured outbound message event.
      java.lang.String nextOutboundEvent()
      Returns the next captured outbound message event.
      void outboundMessage​(int seqNo)  
      void outboundMessageSent​(int seqNo, long optionalWireSize, long optionalUncompressedSize)  
      void outboundUncompressedSize​(long bytes)  
      void outboundWireSize​(long bytes)  
      void serverCallStarted​(io.grpc.ServerStreamTracer.ServerCallInfo<?,​?> callInfo)  
      void setFailDuplicateCallbacks​(boolean fail)
      Sets whether to fail on unexpected duplicate calls to callback methods.
      void streamClosed​(io.grpc.Status status)  
      • Methods inherited from class io.grpc.ServerStreamTracer

        filterContext, serverCallStarted
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serverCallInfo

        protected final java.util.concurrent.atomic.AtomicReference<io.grpc.ServerStreamTracer.ServerCallInfo<?,​?>> serverCallInfo
    • Constructor Detail

      • TestServerStreamTracer

        public TestServerStreamTracer()
    • Method Detail

      • await

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

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

        public io.grpc.ServerStreamTracer.ServerCallInfo<?,​?> getServerCallInfo()
        Returns the ServerCall passed to ServerStreamTracer.serverCallStarted(io.grpc.ServerStreamTracer.ServerCallInfo<?, ?>).
      • 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
      • 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
      • serverCallStarted

        public void serverCallStarted​(io.grpc.ServerStreamTracer.ServerCallInfo<?,​?> callInfo)
        Overrides:
        serverCallStarted in class io.grpc.ServerStreamTracer