Package org.apache.beam.sdk.fn.test
Class TestStreams.Builder<T>
- java.lang.Object
-
- org.apache.beam.sdk.fn.test.TestStreams.Builder<T>
-
- Enclosing class:
- TestStreams
public static class TestStreams.Builder<T> extends java.lang.ObjectA builder for a testCallStreamObserverthat performs various callbacks.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.CallStreamObserver<T>build()TestStreams.Builder<T>withIsReady(java.util.function.Supplier<java.lang.Boolean> isReady)Returns a newTestStreams.Builderlike this one with the specifiedCallStreamObserver.isReady()callback.TestStreams.Builder<T>withOnCompleted(java.lang.Runnable onCompleted)Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onCompleted()callback.TestStreams.Builder<T>withOnError(java.lang.Runnable onError)Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onError(java.lang.Throwable)callback.TestStreams.Builder<T>withOnError(java.util.function.Consumer<java.lang.Throwable> onError)Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onError(java.lang.Throwable)consumer.
-
-
-
Method Detail
-
withIsReady
public TestStreams.Builder<T> withIsReady(java.util.function.Supplier<java.lang.Boolean> isReady)
Returns a newTestStreams.Builderlike this one with the specifiedCallStreamObserver.isReady()callback.
-
withOnCompleted
public TestStreams.Builder<T> withOnCompleted(java.lang.Runnable onCompleted)
Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onCompleted()callback.
-
withOnError
public TestStreams.Builder<T> withOnError(java.lang.Runnable onError)
Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onError(java.lang.Throwable)callback.
-
withOnError
public TestStreams.Builder<T> withOnError(java.util.function.Consumer<java.lang.Throwable> onError)
Returns a newTestStreams.Builderlike this one with the specifiedStreamObserver.onError(java.lang.Throwable)consumer.
-
build
public org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.CallStreamObserver<T> build()
-
-