Class DelayedSubscriber<T>
java.lang.Object
io.micronaut.core.async.publisher.DelayedSubscriber<T>
- Type Parameters:
T- The forwarded type
- All Implemented Interfaces:
org.reactivestreams.Processor<T,,T> org.reactivestreams.Publisher<T>,org.reactivestreams.Subscriber<T>,org.reactivestreams.Subscription
@Internal
public final class DelayedSubscriber<T>
extends Object
implements org.reactivestreams.Processor<T,T>, org.reactivestreams.Subscription
This is a
Processor that does not change the stream, but allows the upstream
Publisher and downstream Subscriber to be set independently
in any order. If the upstream is set first, this class makes sure that any early completion
is held back until the downstream has finished onSubscribe. If the downstream is set
first, this class makes sure any demand is stored until the upstream becomes available.- Since:
- 4.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidvoidvoidvoidonSubscribe(org.reactivestreams.Subscription s) voidrequest(long n) void
-
Constructor Details
-
DelayedSubscriber
public DelayedSubscriber()
-
-
Method Details
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<T>
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s) - Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onNext
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
request
public void request(long n) - Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-