Class MultiTappedPublisher.Builder<T>
java.lang.Object
io.helidon.common.reactive.MultiTappedPublisher.Builder<T>
- Type Parameters:
T- type of returned multi
- All Implemented Interfaces:
Builder<MultiTappedPublisher.Builder<T>, MultiTappedPublisher<T>>, Supplier<MultiTappedPublisher<T>>
- Enclosing class:
MultiTappedPublisher<T>
public static class MultiTappedPublisher.Builder<T>
extends Object
implements Builder<MultiTappedPublisher.Builder<T>, MultiTappedPublisher<T>>
Multi tapped publisher builder to register custom callbacks.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.onCancelCallback(Runnable onCancelCallback) On cancel callback.onCompleteCallback(Runnable onCompleteCallback) On complete callback.onErrorCallback(Consumer<? super Throwable> onErrorCallback) On error callback.onNextCallback(Consumer<? super T> onNextCallback) On next callback.onRequestCallback(LongConsumer onRequestCallback) On request callback.onSubscribeCallback(Runnable onSubscribeCallback) Subscription callback.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault MultiTappedPublisher<T> get()default MultiTappedPublisher.Builder<T> identity()Instance of this builder as the correct type.default MultiTappedPublisher.Builder<T> update(Consumer<MultiTappedPublisher.Builder<T>> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<MultiTappedPublisher.Builder<T>, MultiTappedPublisher<T>>- Returns:
- instance of the built type
-
onSubscribeCallback
Subscription callback.- Parameters:
onSubscribeCallback- runnable to run whenFlow.Subscriber.onSubscribe(java.util.concurrent.Flow.Subscription)is called- Returns:
- updated builder instance
-
onNextCallback
On next callback.- Parameters:
onNextCallback- runnable to run whenFlow.Subscriber.onNext(Object)is called- Returns:
- updated builder instance
-
onCompleteCallback
On complete callback.- Parameters:
onCompleteCallback- runnable to run whenFlow.Subscriber.onComplete()is called- Returns:
- updated builder instance
-
onRequestCallback
On request callback.- Parameters:
onRequestCallback- runnable to run whenFlow.Subscription.request(long)is called- Returns:
- updated builder instance
-
onCancelCallback
On cancel callback.- Parameters:
onCancelCallback- runnable to run whenFlow.Subscription.cancel()is called- Returns:
- updated builder instance
-
onErrorCallback
On error callback.- Parameters:
onErrorCallback- runnable to run whenFlow.Subscriber.onError(Throwable)is called- Returns:
- updated builder instance
-