Package io.grpc.internal.testing
Interface TestStreamTracer
-
- All Known Implementing Classes:
TestClientStreamTracer
,TestServerStreamTracer
,TestStreamTracer.TestBaseStreamTracer
public interface TestStreamTracer
AStreamTracer
suitable for testing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TestStreamTracer.TestBaseStreamTracer
AStreamTracer
suitable for testing.
-
Method Summary
All Methods Instance Methods Abstract 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 toStreamTracer.inboundUncompressedSize(long)
.long
getInboundWireSize()
Returns to sum of all sizes passed toStreamTracer.inboundWireSize(long)
.long
getOutboundUncompressedSize()
Returns to sum of al sizes passed toStreamTracer.outboundUncompressedSize(long)
.long
getOutboundWireSize()
Returns to sum of all sizes passed toStreamTracer.outboundWireSize(long)
.io.grpc.Status
getStatus()
Returns the status passed toStreamTracer.streamClosed(io.grpc.Status)
.java.lang.String
nextInboundEvent()
Returns the next captured outbound message event.java.lang.String
nextOutboundEvent()
Returns the next captured outbound message event.void
setFailDuplicateCallbacks(boolean fail)
Sets whether to fail on unexpected duplicate calls to callback methods.
-
-
-
Method Detail
-
await
void await() throws java.lang.InterruptedException
Waits for the stream to be done.- Throws:
java.lang.InterruptedException
-
await
boolean await(long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedException
Waits for the stream to be done.- Throws:
java.lang.InterruptedException
-
getStatus
io.grpc.Status getStatus()
Returns the status passed toStreamTracer.streamClosed(io.grpc.Status)
.
-
getInboundWireSize
long getInboundWireSize()
Returns to sum of all sizes passed toStreamTracer.inboundWireSize(long)
.
-
getInboundUncompressedSize
long getInboundUncompressedSize()
Returns to sum of all sizes passed toStreamTracer.inboundUncompressedSize(long)
.
-
getOutboundWireSize
long getOutboundWireSize()
Returns to sum of all sizes passed toStreamTracer.outboundWireSize(long)
.
-
getOutboundUncompressedSize
long getOutboundUncompressedSize()
Returns to sum of al sizes passed toStreamTracer.outboundUncompressedSize(long)
.
-
setFailDuplicateCallbacks
void setFailDuplicateCallbacks(boolean fail)
Sets whether to fail on unexpected duplicate calls to callback methods.
-
nextOutboundEvent
@Nullable java.lang.String nextOutboundEvent()
Returns the next captured outbound message event.
-
nextInboundEvent
java.lang.String nextInboundEvent()
Returns the next captured outbound message event.
-
-