Package akka.stream.javadsl
Class JavaFlowSupport.Flow
- java.lang.Object
-
- akka.stream.javadsl.JavaFlowSupport.Flow
-
- Enclosing class:
- JavaFlowSupport
public static final class JavaFlowSupport.Flow extends java.lang.Object
{@link akka.stream.javadsl.Flow]] factories operating withjava.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 aFlow.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 aRunnableGraph
that materializes to a Reactive StreamsFlow.Processor
which implements the operations encapsulated by this Flow.
-
-
-
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 aFlow.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 aRunnableGraph
that materializes to a Reactive StreamsFlow.Processor
which implements the operations encapsulated by this Flow. Every materialization results in a new Processor instance, i.e. the returnedRunnableGraph
is reusable.- Returns:
- A
RunnableGraph
that materializes to aProcessor
whenrun()
is called on it.
-
-