Package hu.akarnokd.rxjava3.jdk9interop
Class FlowInterop
- java.lang.Object
-
- hu.akarnokd.rxjava3.jdk9interop.FlowInterop
-
public final class FlowInterop extends java.lang.ObjectConverters to and from Java 9 Flow components.- Since:
- 0.1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> FlowableProcessor<T>fromFlowProcessor(java.util.concurrent.Flow.Processor<T,T> source)Wraps a Flow.Processor (identity) into a FlowableProcessor.static <T> Flowable<T>fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source)Wraps a Flow.Publisher into a Flowable.static <T> FlowableConverter<T,java.util.concurrent.Flow.Publisher<T>>toFlow()Converter function from a Flowable into a Publisher.static <T,R>
java.util.concurrent.Flow.Processor<T,R>toFlowProcessor(Processor<T,R> source)Wraps an RS Processor into a Flow.Processor.static <T> java.util.concurrent.Flow.Publisher<T>toFlowPublisher(Publisher<T> source)Wraps an RS Publisher into a Flow.Publisher.
-
-
-
Method Detail
-
fromFlowPublisher
public static <T> Flowable<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source)
Wraps a Flow.Publisher into a Flowable.- Type Parameters:
T- the value type- Parameters:
source- the source Flow.Publisher, not null- Returns:
- the new Flowable instance
- Throws:
java.lang.NullPointerException- if source is null
-
toFlow
public static <T> FlowableConverter<T,java.util.concurrent.Flow.Publisher<T>> toFlow()
Converter function from a Flowable into a Publisher.- Type Parameters:
T- the value type- Returns:
- the converter function instance to be used with
Flowable.to().
-
fromFlowProcessor
public static <T> FlowableProcessor<T> fromFlowProcessor(java.util.concurrent.Flow.Processor<T,T> source)
Wraps a Flow.Processor (identity) into a FlowableProcessor.- Type Parameters:
T- the input and output type of the Flow.Processor- Parameters:
source- the source Flow.Processor, not null- Returns:
- the new FlowableProcessor instance
- Throws:
java.lang.NullPointerException- if source is null
-
toFlowPublisher
public static <T> java.util.concurrent.Flow.Publisher<T> toFlowPublisher(Publisher<T> source)
Wraps an RS Publisher into a Flow.Publisher.- Type Parameters:
T- the value type- Parameters:
source- the source RS Publisher instance, not null- Returns:
- the new Flow.Publisher instance
- Throws:
java.lang.NullPointerException- if source is null
-
toFlowProcessor
public static <T,R> java.util.concurrent.Flow.Processor<T,R> toFlowProcessor(Processor<T,R> source)
Wraps an RS Processor into a Flow.Processor.- Type Parameters:
T- the input value typeR- the output value type- Parameters:
source- the source RS Processor- Returns:
- the new Flow.Processor instance
- Throws:
java.lang.NullPointerException- if source is null
-
-