Class TestStreams.Builder<T>

  • Enclosing class:
    TestStreams

    public static class TestStreams.Builder<T>
    extends java.lang.Object
    A builder for a test CallStreamObserver that performs various callbacks.
    • Method Detail

      • withIsReady

        public TestStreams.Builder<T> withIsReady​(java.util.function.Supplier<java.lang.Boolean> isReady)
        Returns a new TestStreams.Builder like this one with the specified CallStreamObserver.isReady() callback.
      • withOnCompleted

        public TestStreams.Builder<T> withOnCompleted​(java.lang.Runnable onCompleted)
        Returns a new TestStreams.Builder like this one with the specified StreamObserver.onCompleted() callback.
      • withOnError

        public TestStreams.Builder<T> withOnError​(java.lang.Runnable onError)
        Returns a new TestStreams.Builder like this one with the specified StreamObserver.onError(java.lang.Throwable) callback.
      • withOnError

        public TestStreams.Builder<T> withOnError​(java.util.function.Consumer<java.lang.Throwable> onError)
        Returns a new TestStreams.Builder like this one with the specified StreamObserver.onError(java.lang.Throwable) consumer.
      • build

        public org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.CallStreamObserver<T> build()