Class FlowAdapters
java.lang.Object
org.reactivestreams.FlowAdapters
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> Flow.Processor <T, U> toFlowProcessor(Processor<? super T, ? extends U> reactiveStreamsProcessor) Converts a Reactive Streams Processor into a Flow Processor.static <T> Flow.Publisher<T> toFlowPublisher(Publisher<? extends T> reactiveStreamsPublisher) Converts a Reactive Streams Publisher into a Flow Publisher.static <T> Flow.Subscriber<T> toFlowSubscriber(Subscriber<T> reactiveStreamsSubscriber) Converts a Reactive Streams Subscriber into a Flow Subscriber.static <T,U> Processor <T, U> toProcessor(Flow.Processor<? super T, ? extends U> flowProcessor) Converts a Flow Processor into a Reactive Streams Processor.static <T> Publisher<T> toPublisher(Flow.Publisher<? extends T> flowPublisher) Converts a Flow Publisher into a Reactive Streams Publisher.static <T> Subscriber<T> toSubscriber(Flow.Subscriber<T> flowSubscriber) Converts a Flow Subscriber into a Reactive Streams Subscriber.
-
Method Details
-
toPublisher
Converts a Flow Publisher into a Reactive Streams Publisher.- Type Parameters:
T- the element type- Parameters:
flowPublisher- the source Flow Publisher to convert- Returns:
- the equivalent Reactive Streams Publisher
-
toFlowPublisher
public static <T> Flow.Publisher<T> toFlowPublisher(Publisher<? extends T> reactiveStreamsPublisher) Converts a Reactive Streams Publisher into a Flow Publisher.- Type Parameters:
T- the element type- Parameters:
reactiveStreamsPublisher- the source Reactive Streams Publisher to convert- Returns:
- the equivalent Flow Publisher
-
toProcessor
public static <T,U> Processor<T,U> toProcessor(Flow.Processor<? super T, ? extends U> flowProcessor) Converts a Flow Processor into a Reactive Streams Processor.- Type Parameters:
T- the input value typeU- the output value type- Parameters:
flowProcessor- the source Flow Processor to convert- Returns:
- the equivalent Reactive Streams Processor
-
toFlowProcessor
public static <T,U> Flow.Processor<T,U> toFlowProcessor(Processor<? super T, ? extends U> reactiveStreamsProcessor) Converts a Reactive Streams Processor into a Flow Processor.- Type Parameters:
T- the input value typeU- the output value type- Parameters:
reactiveStreamsProcessor- the source Reactive Streams Processor to convert- Returns:
- the equivalent Flow Processor
-
toFlowSubscriber
Converts a Reactive Streams Subscriber into a Flow Subscriber.- Type Parameters:
T- the input and output value type- Parameters:
reactiveStreamsSubscriber- the Reactive Streams Subscriber instance to convert- Returns:
- the equivalent Flow Subscriber
-
toSubscriber
Converts a Flow Subscriber into a Reactive Streams Subscriber.- Type Parameters:
T- the input and output value type- Parameters:
flowSubscriber- the Flow Subscriber instance to convert- Returns:
- the equivalent Reactive Streams Subscriber
-