java.lang.Object
io.helidon.common.reactive.SequentialSubscriber<T>
- Type Parameters:
T- Type of the item
- All Implemented Interfaces:
Flow.Subscriber<T>
Wrapper
Flow.Subscriber ensuring OnSubscribe, onNext, onError
and onComplete to be signaled serially.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSequentialSubscriber(Flow.Subscriber<T> subscriber) Provides protection from untrusted publishers, enforces rule 1.3 by serializing all parallel calls. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SequentialSubscriber<T> create(Flow.Subscriber<T> subscriber) WrapperFlow.SubscriberensuringOnSubscribe,onNext,onErrorandonCompleteto be signaled serially.voidvoidvoidvoidonSubscribe(Flow.Subscription subscription)
-
Constructor Details
-
SequentialSubscriber
Provides protection from untrusted publishers, enforces rule 1.3 by serializing all parallel calls.- Parameters:
subscriber- to be protected
-
-
Method Details
-
create
WrapperFlow.SubscriberensuringOnSubscribe,onNext,onErrorandonCompleteto be signaled serially.- Type Parameters:
T- item type- Parameters:
subscriber-Flow.Subscriberto be wrapped.- Returns:
- new
SequentialSubscriber
-
onSubscribe
- Specified by:
onSubscribein interfaceFlow.Subscriber<T>
-
onNext
- Specified by:
onNextin interfaceFlow.Subscriber<T>
-
onError
- Specified by:
onErrorin interfaceFlow.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceFlow.Subscriber<T>
-