Interface HybridSubscriber<T>
-
- Type Parameters:
T- type of items
- All Superinterfaces:
Flow.Subscriber<T>,org.reactivestreams.Subscriber<T>
public interface HybridSubscriber<T> extends Flow.Subscriber<T>, org.reactivestreams.Subscriber<T>
Wrapper forReactive StreamsSubscriberorHelidon reactive streamsFlow.Subscriber, to be used interchangeably.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHybridSubscriber.DummySubscriber<T>Simple releasable subscriber reference.static classHybridSubscriber.SubscriberReference<T>Simple releasable subscriber reference.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static <T> HybridSubscriber<T>from(Flow.Subscriber<T> subscriber)Create newHybridSubscriberfromFlow.Subscriber.static <T> HybridSubscriber<T>from(org.reactivestreams.Subscriber<T> s)Create newHybridSubscriberfromSubscriber.default voidonSubscribe(Flow.Subscription subscription)default voidonSubscribe(org.reactivestreams.Subscription subscription)-
Methods inherited from interface java.util.concurrent.Flow.Subscriber
onComplete, onError, onNext
-
-
-
-
Method Detail
-
from
static <T> HybridSubscriber<T> from(Flow.Subscriber<T> subscriber)
Create newHybridSubscriberfromFlow.Subscriber.- Type Parameters:
T- type of items- Parameters:
subscriber-Flow.Subscriberto wrap- Returns:
HybridSubscribercompatible withReactive StreamsandHelidon reactive streams
-
from
static <T> HybridSubscriber<T> from(org.reactivestreams.Subscriber<T> s)
Create newHybridSubscriberfromSubscriber.- Type Parameters:
T- type of items- Parameters:
s-Subscriberto wrap- Returns:
HybridSubscribercompatible withReactive StreamsandHelidon reactive streams
-
onSubscribe
default void onSubscribe(Flow.Subscription subscription)
- Specified by:
onSubscribein interfaceFlow.Subscriber<T>
-
onSubscribe
default void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
-