Package org.reactivestreams
Class FlowAdapters.ReactivePublisherFromFlow<T>
- java.lang.Object
-
- org.reactivestreams.FlowAdapters.ReactivePublisherFromFlow<T>
-
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Publisher<T>
- Enclosing class:
- FlowAdapters
static final class FlowAdapters.ReactivePublisherFromFlow<T> extends java.lang.Object implements Publisher<T>
Reactive Streams Publisher that wraps a Flow Publisher.
-
-
Constructor Summary
Constructors Constructor Description ReactivePublisherFromFlow(java.util.concurrent.Flow.Publisher<? extends T> flowPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsubscribe(Subscriber<? super T> reactive)RequestPublisherto start streaming data.
-
-
-
Field Detail
-
flow
final java.util.concurrent.Flow.Publisher<? extends T> flow
-
-
Constructor Detail
-
ReactivePublisherFromFlow
public ReactivePublisherFromFlow(java.util.concurrent.Flow.Publisher<? extends T> flowPublisher)
-
-
Method Detail
-
subscribe
public void subscribe(Subscriber<? super T> reactive)
Description copied from interface:PublisherRequestPublisherto start streaming data.This is a "factory method" and can be called multiple times, each time starting a new
Subscription.Each
Subscriptionwill work for only a singleSubscriber.A
Subscribershould only subscribe once to a singlePublisher.If the
Publisherrejects the subscription attempt or otherwise fails it will signal the error viaSubscriber.onError(Throwable).- Specified by:
subscribein interfacePublisher<T>- Parameters:
reactive- theSubscriberthat will consume signals from thisPublisher
-
-