Class JavaFlowSupport.Flow

java.lang.Object
org.apache.pekko.stream.javadsl.JavaFlowSupport.Flow
Enclosing class:
JavaFlowSupport

public static final class JavaFlowSupport.Flow extends Object
{@link org.apache.pekko.stream.javadsl.Flow]] factories operating with java.util.concurrent.Flow.* interfaces.
  • Method Details

    • fromProcessor

      public static <I, O> Flow<I,O,NotUsed> fromProcessor(Creator<Flow.Processor<I,O>> processorFactory) throws Exception
      Creates a Flow from a Flow.Processor
      Throws:
      Exception
    • fromProcessorMat

      public static <I, O, M> Flow<I,O,M> fromProcessorMat(Creator<Pair<Flow.Processor<I,O>,M>> processorFactory) throws Exception
      Creates a Flow from a {@link java.util.concurrent.Flow.Processor>> and returns a materialized value.
      Throws:
      Exception
    • toProcessor

      public static <In, Out, Mat> RunnableGraph<Flow.Processor<In,Out>> toProcessor(Flow<In,Out,Mat> flow)
      Converts this Flow to a RunnableGraph that materializes to a Reactive Streams Flow.Processor which implements the operations encapsulated by this Flow. Every materialization results in a new Processor instance, i.e. the returned RunnableGraph is reusable.
      Returns:
      A RunnableGraph that materializes to a Processor when run() is called on it.