Class LazySendingSubscriber<T>
java.lang.Object
io.micronaut.core.async.subscriber.LazySendingSubscriber<T>
- Type Parameters:
T- The publisher item type
- All Implemented Interfaces:
org.reactivestreams.Publisher<T>,org.reactivestreams.Subscriber<T>,org.reactivestreams.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>, org.reactivestreams.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
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()static <T> @NonNull io.micronaut.core.execution.ExecutionFlow<org.reactivestreams.Publisher<T>>create(@NonNull org.reactivestreams.Publisher<T> input) Create anExecutionFlowthat waits for the first item of the given publisher.reactor.util.context.ContextvoidvoidvoidvoidonSubscribe(org.reactivestreams.Subscription s) voidrequest(long n) voidvoid
-
Method Details
-
create
@NonNull public static <T> @NonNull io.micronaut.core.execution.ExecutionFlow<org.reactivestreams.Publisher<T>> create(@NonNull @NonNull org.reactivestreams.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
public void onSubscribe(org.reactivestreams.Subscription s) -
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>
-
subscribe
- Specified by:
subscribein interfacereactor.core.CorePublisher<T>
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<T>
-
request
public void request(long n) - Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-