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 Details

    • create

      @NonNull public static <T> @NonNull ExecutionFlow<Publisher<T>> create(@NonNull @NonNull Publisher<T> input)
      Create an ExecutionFlow 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 interface reactor.core.CoreSubscriber<T>
    • onSubscribe

      public void onSubscribe(Subscription s)
      Specified by:
      onSubscribe in interface reactor.core.CoreSubscriber<T>
      Specified by:
      onSubscribe in interface Subscriber<T>
    • onNext

      public void onNext(T t)
      Specified by:
      onNext in interface Subscriber<T>
    • onError

      public void onError(Throwable t)
      Specified by:
      onError in interface Subscriber<T>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface Subscriber<T>
    • subscribe

      public void subscribe(reactor.core.CoreSubscriber<? super T> subscriber)
      Specified by:
      subscribe in interface reactor.core.CorePublisher<T>
    • subscribe

      public void subscribe(Subscriber<? super T> s)
      Specified by:
      subscribe in interface Publisher<T>
    • request

      public void request(long n)
      Specified by:
      request in interface Subscription
    • cancel

      public void cancel()
      Specified by:
      cancel in interface Subscription