Class LazySendingSubscriber<T>
java.lang.Object
io.micronaut.core.async.subscriber.LazySendingSubscriber<T>
- Type Parameters:
T- The publisher item type
- All Implemented Interfaces:
Publisher<T>,Subscriber<T>,Subscription,reactor.core.CorePublisher<T>,reactor.core.CoreSubscriber<T>
@Internal
public final class LazySendingSubscriber<T>
extends Object
implements reactor.core.CoreSubscriber<T>, reactor.core.CorePublisher<T>, Subscription
This class waits for the first item of a publisher before completing an ExecutionFlow with a
publisher containing the same items.
- Since:
- 4.8.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()static <T> @NonNull ExecutionFlow<Publisher<T>>Create anExecutionFlowthat waits for the first item of the given publisher.reactor.util.context.Contextvoidvoidvoidvoidvoidrequest(long n) voidsubscribe(Subscriber<? super T> s) void
-
Method Details
-
create
@NonNull public static <T> @NonNull ExecutionFlow<Publisher<T>> create(@NonNull @NonNull Publisher<T> input) Create anExecutionFlowthat waits for the first item of the given publisher. If there is an error before the first item, the flow will fail. If there is no error, the flow will complete with a publisher containing all items, including the first one.- Type Parameters:
T- The item type- Parameters:
input- The input stream- Returns:
- A flow that will complete with the same stream
-
currentContext
public reactor.util.context.Context currentContext()- Specified by:
currentContextin interfacereactor.core.CoreSubscriber<T>
-
onSubscribe
- Specified by:
onSubscribein interfacereactor.core.CoreSubscriber<T>- 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>
-
subscribe
- Specified by:
subscribein interfacereactor.core.CorePublisher<T>
-
subscribe
-
request
public void request(long n) - Specified by:
requestin interfaceSubscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceSubscription
-