Class DelayedSubscriber<T>
java.lang.Object
io.micronaut.core.async.publisher.DelayedSubscriber<T>
- Type Parameters:
T- The forwarded type
- All Implemented Interfaces:
Processor<T,,T> Publisher<T>,Subscriber<T>,Subscription
@Internal
public final class DelayedSubscriber<T>
extends Object
implements Processor<T,T>, 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
- Author:
- Jonas Konrad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidvoidvoidvoidvoidrequest(long n) voidsubscribe(Subscriber<? super T> s)
-
Constructor Details
-
DelayedSubscriber
public DelayedSubscriber()
-
-
Method Details
-
subscribe
-
onSubscribe
- Specified by:
onSubscribein interfaceSubscriber<T>
-
onNext
- Specified by:
onNextin interfaceSubscriber<T>
-
onError
- Specified by:
onErrorin interfaceSubscriber<T>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceSubscriber<T>
-
request
public void request(long n) - Specified by:
requestin interfaceSubscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceSubscription
-