Class JavaFlowSupport.Flow

  • Enclosing class:
    JavaFlowSupport

    public static final class JavaFlowSupport.Flow
    extends java.lang.Object
    {@link akka.stream.javadsl.Flow]] factories operating with java.util.concurrent.Flow.* interfaces.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <I,​O>
      Flow<I,​O,​NotUsed>
      fromProcessor​(Creator<java.util.concurrent.Flow.Processor<I,​O>> processorFactory)
      Creates a Flow from a Flow.Processor
      static <I,​O,​M>
      Flow<I,​O,​M>
      fromProcessorMat​(Creator<Pair<java.util.concurrent.Flow.Processor<I,​O>,​M>> processorFactory)
      Creates a Flow from a {@link java.util.concurrent.Flow.Processor>> and returns a materialized value.
      static <In,​Out,​Mat>
      RunnableGraph<java.util.concurrent.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.
      • Methods inherited from class java.lang.Object

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

      • fromProcessor

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

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

        public static <In,​Out,​Mat> RunnableGraph<java.util.concurrent.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.