Class ReactiveStreamsAdapters
java.lang.Object
io.servicetalk.concurrent.reactivestreams.ReactiveStreamsAdapters
A set of adapter methods for converting to and from
Reactive Streams APIs and ServiceTalk APIs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Publisher<T>
fromReactiveStreamsPublisher
(org.reactivestreams.Publisher<T> source) static <T> org.reactivestreams.Publisher<T>
static <T> org.reactivestreams.Publisher<T>
toReactiveStreamsPublisher
(Publisher<T> publisher) static <T> org.reactivestreams.Publisher<T>
toReactiveStreamsPublisher
(Single<T> source) static <T> org.reactivestreams.Publisher<T>
static <T> org.reactivestreams.Publisher<T>
toReactiveStreamsPublisher
(PublisherSource<T> source) static <T> org.reactivestreams.Publisher<T>
toReactiveStreamsPublisher
(SingleSource<T> source)
-
Method Details
-
fromReactiveStreamsPublisher
public static <T> Publisher<T> fromReactiveStreamsPublisher(org.reactivestreams.Publisher<T> source) -
toReactiveStreamsPublisher
public static <T> org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(Publisher<T> publisher) -
toReactiveStreamsPublisher
public static <T> org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(PublisherSource<T> source) - Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
source
-PublisherSource
to convert to aPublisher
.- Returns:
- A
Publisher
representation of the passedPublisherSource
.
-
toReactiveStreamsPublisher
-
toReactiveStreamsPublisher
public static <T> org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(SingleSource<T> source) - Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
source
-SingleSource
to convert to aPublisher
.- Returns:
- A
Publisher
representation of the passedSingleSource
.
-
toReactiveStreamsPublisher
- Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
source
-Completable
to convert to aPublisher
.- Returns:
- A
Publisher
representation of the passedCompletable
.
-
toReactiveStreamsPublisher
public static <T> org.reactivestreams.Publisher<T> toReactiveStreamsPublisher(CompletableSource source) - Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
source
-CompletableSource
to convert to aPublisher
.- Returns:
- A
Publisher
representation of the passedCompletableSource
.
-