Class AsyncSingleResultPublisher<T>

  • Type Parameters:
    T - The argument type
    All Implemented Interfaces:
    Publishers.MicronautPublisher<T>, org.reactivestreams.Publisher<T>

    public class AsyncSingleResultPublisher<T>
    extends java.lang.Object
    implements Publishers.MicronautPublisher<T>
    A Publisher that uses an ExecutorService to emit a single result.
    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncSingleResultPublisher​(java.util.concurrent.ExecutorService executor, java.util.function.Supplier<T> supplier)
      Constructor.
      AsyncSingleResultPublisher​(java.util.function.Supplier<T> supplier)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsyncSingleResultPublisher

        public AsyncSingleResultPublisher​(java.util.concurrent.ExecutorService executor,
                                          java.util.function.Supplier<T> supplier)
        Constructor.
        Parameters:
        executor - executor
        supplier - type of supplier
      • AsyncSingleResultPublisher

        public AsyncSingleResultPublisher​(java.util.function.Supplier<T> supplier)
        Constructor.
        Parameters:
        supplier - type of supplier
    • Method Detail

      • subscribe

        public final void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<T>