Class FlowAdapters
java.lang.Object
org.reactivestreams.FlowAdapters
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classFlow Publisher that wraps a Reactive Streams Publisher.(package private) static final classWraps a Reactive Streams Processor and forwards methods of the Flow Processor to it.(package private) static final classWraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.(package private) static final classWraps a Reactive Streams Subscription and converts the calls to a Flow Subscription.(package private) static final classReactive Streams Publisher that wraps a Flow Publisher.(package private) static final classWraps a Flow Processor and forwards methods of the Reactive Streams Processor to it.(package private) static final classWraps a Flow Subscriber and forwards methods of the Reactive Streams Subscriber to it.(package private) static final classWraps a Flow Subscription and converts the calls to a Reactive Streams Subscription. -
Constructor Summary
Constructors -
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.
-
Constructor Details
-
FlowAdapters
private FlowAdapters()Utility class.
-
-
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
-