Interface ReactiveExecutionFlow<T>
- Type Parameters:
T
- The value type
- All Superinterfaces:
ExecutionFlow<T>
The reactive execution flow.
NOTE: The flow is expected to produce only one result.
- Since:
- 4.0.0
- Author:
- Denis Stepnov
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K> @NonNull ReactiveExecutionFlow<K>
Create a new reactive flow by invoking a supplier asynchronously.static <K> @NonNull ReactiveExecutionFlow<K>
fromFlow
(@NonNull ExecutionFlow<K> flow) Creates a new reactive flow from other flow.static <K> @NonNull ReactiveExecutionFlow<K>
fromPublisher
(@NonNull Publisher<K> publisher) Creates a new reactive flow from a publisher.Returns the reactive flow represented by a publisher.static <K> Publisher<K>
toPublisher
(Supplier<ExecutionFlow<K>> flowSupplier) Methods inherited from interface io.micronaut.core.execution.ExecutionFlow
flatMap, map, onComplete, onErrorResume, putInContext, then, toCompletableFuture, tryComplete, tryCompleteError, tryCompleteValue
-
Method Details
-
fromPublisher
@NonNull static <K> @NonNull ReactiveExecutionFlow<K> fromPublisher(@NonNull @NonNull Publisher<K> publisher) Creates a new reactive flow from a publisher.- Type Parameters:
K
- THe flow value type- Parameters:
publisher
- The publisher- Returns:
- a new flow
-
async
@NonNull static <K> @NonNull ReactiveExecutionFlow<K> async(@NonNull @NonNull Executor executor, @NonNull @NonNull Supplier<ExecutionFlow<K>> supplier) Create a new reactive flow by invoking a supplier asynchronously.- Type Parameters:
K
- The flow value type- Parameters:
executor
- The executorsupplier
- The supplier- Returns:
- a new flow
-
fromFlow
@NonNull static <K> @NonNull ReactiveExecutionFlow<K> fromFlow(@NonNull @NonNull ExecutionFlow<K> flow) Creates a new reactive flow from other flow.- Type Parameters:
K
- THe flow value type- Parameters:
flow
- The flow- Returns:
- a new flow
-
toPublisher
Returns the reactive flow represented by a publisher.- Returns:
- The publisher
-
toPublisher
-