Package org.apache.pekko.stream.javadsl
Class JavaFlowSupport.Flow
java.lang.Object
org.apache.pekko.stream.javadsl.JavaFlowSupport.Flow
- Enclosing class:
- JavaFlowSupport
{@link org.apache.pekko.stream.javadsl.Flow]] factories operating with
java.util.concurrent.Flow.* interfaces.-
Method Summary
Modifier and TypeMethodDescriptionfromProcessor(Creator<Flow.Processor<I, O>> processorFactory) Creates a Flow from aFlow.Processorstatic <I,O, M> Flow<I, O, M> fromProcessorMat(Creator<Pair<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<Flow.Processor<In,Out>> toProcessor(Flow<In, Out, Mat> flow) Converts this Flow to aRunnableGraphthat materializes to a Reactive StreamsFlow.Processorwhich implements the operations encapsulated by this Flow.
-
Method Details
-
fromProcessor
public static <I,O> Flow<I,O, fromProcessorNotUsed> (Creator<Flow.Processor<I, O>> processorFactory) throws ExceptionCreates a Flow from aFlow.Processor- Throws:
Exception
-
fromProcessorMat
public static <I,O, Flow<I,M> O, fromProcessorMatM> (Creator<Pair<Flow.Processor<I, O>, throws ExceptionM>> processorFactory) Creates a Flow from a {@link java.util.concurrent.Flow.Processor>> and returns a materialized value.- Throws:
Exception
-
toProcessor
public static <In,Out, RunnableGraph<Flow.Processor<In,Mat> Out>> toProcessor(Flow<In, Out, Mat> flow) Converts this Flow to aRunnableGraphthat materializes to a Reactive StreamsFlow.Processorwhich implements the operations encapsulated by this Flow. Every materialization results in a new Processor instance, i.e. the returnedRunnableGraphis reusable.- Returns:
- A
RunnableGraphthat materializes to aProcessorwhenrun()is called on it.
-