Interface ReactiveExecutionFlow<T>

Type Parameters:
T - The value type
All Superinterfaces:
io.micronaut.core.execution.ExecutionFlow<T>

@Internal public interface ReactiveExecutionFlow<T> extends io.micronaut.core.execution.ExecutionFlow<T>
The reactive execution flow. NOTE: The flow is expected to produce only one result.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K> @NonNull ReactiveExecutionFlow<K>
    async(@NonNull Executor executor, @NonNull Supplier<io.micronaut.core.execution.ExecutionFlow<K>> supplier)
    Create a new reactive flow by invoking a supplier asynchronously.
    static <K> @NonNull ReactiveExecutionFlow<K>
    fromFlow(@NonNull io.micronaut.core.execution.ExecutionFlow<K> flow)
    Creates a new reactive flow from other flow.
    static <K> @NonNull ReactiveExecutionFlow<K>
    fromPublisher(@NonNull org.reactivestreams.Publisher<K> publisher)
    Creates a new reactive flow from a publisher.
    @NonNull org.reactivestreams.Publisher<T>
    Returns the reactive flow represented by a publisher.
    static <K> org.reactivestreams.Publisher<K>
    toPublisher(Supplier<io.micronaut.core.execution.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 org.reactivestreams.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<io.micronaut.core.execution.ExecutionFlow<K>> supplier)
      Create a new reactive flow by invoking a supplier asynchronously.
      Type Parameters:
      K - The flow value type
      Parameters:
      executor - The executor
      supplier - The supplier
      Returns:
      a new flow
    • fromFlow

      @NonNull static <K> @NonNull ReactiveExecutionFlow<K> fromFlow(@NonNull @NonNull io.micronaut.core.execution.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

      @NonNull @NonNull org.reactivestreams.Publisher<T> toPublisher()
      Returns the reactive flow represented by a publisher.
      Returns:
      The publisher
    • toPublisher

      static <K> org.reactivestreams.Publisher<K> toPublisher(Supplier<io.micronaut.core.execution.ExecutionFlow<K>> flowSupplier)