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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
void
void
void
void
void
request
(long n) void
subscribe
(Subscriber<? super T> s)
-
Constructor Details
-
DelayedSubscriber
public DelayedSubscriber()
-
-
Method Details
-
subscribe
-
onSubscribe
- Specified by:
onSubscribe
in interfaceSubscriber<T>
-
onNext
- Specified by:
onNext
in interfaceSubscriber<T>
-
onError
- Specified by:
onError
in interfaceSubscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceSubscriber<T>
-
request
public void request(long n) - Specified by:
request
in interfaceSubscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceSubscription
-