Class AsyncSingleResultPublisher<T>
- java.lang.Object
-
- io.micronaut.core.async.publisher.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>
APublisher
that uses anExecutorService
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)
-
-
-
Constructor Detail
-
AsyncSingleResultPublisher
public AsyncSingleResultPublisher(java.util.concurrent.ExecutorService executor, java.util.function.Supplier<T> supplier)
Constructor.- Parameters:
executor
- executorsupplier
- type of supplier
-
AsyncSingleResultPublisher
public AsyncSingleResultPublisher(java.util.function.Supplier<T> supplier)
Constructor.- Parameters:
supplier
- type of supplier
-
-