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 TypeMethodDescriptionvoid
cancel()
static <T> @NonNull ExecutionFlow<Publisher<T>>
Create anExecutionFlow
that waits for the first item of the given publisher.reactor.util.context.Context
void
void
void
void
void
request
(long n) void
subscribe
(Subscriber<? super T> s) void
-
Method Details
-
create
@NonNull public static <T> @NonNull ExecutionFlow<Publisher<T>> create(@NonNull @NonNull Publisher<T> input) Create anExecutionFlow
that 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:
currentContext
in interfacereactor.core.CoreSubscriber<T>
-
onSubscribe
- Specified by:
onSubscribe
in interfacereactor.core.CoreSubscriber<T>
- 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>
-
subscribe
- Specified by:
subscribe
in interfacereactor.core.CorePublisher<T>
-
subscribe
-
request
public void request(long n) - Specified by:
request
in interfaceSubscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceSubscription
-