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
ModifierConstructorDescriptionprotected
SequentialSubscriber
(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.Subscriber
ensuringOnSubscribe
,onNext
,onError
andonComplete
to be signaled serially.void
void
void
void
onSubscribe
(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.Subscriber
ensuringOnSubscribe
,onNext
,onError
andonComplete
to be signaled serially.- Type Parameters:
T
- item type- Parameters:
subscriber
-Flow.Subscriber
to be wrapped.- Returns:
- new
SequentialSubscriber
-
onSubscribe
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<T>
-
onNext
- Specified by:
onNext
in interfaceFlow.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceFlow.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceFlow.Subscriber<T>
-