public final class SourceAdapters
extends java.lang.Object
io.servicetalk.concurrent
module.Modifier and Type | Method and Description |
---|---|
static Completable |
fromSource(CompletableSource source)
Converts the provided
CompletableSource into a Completable . |
static <T> Publisher<T> |
fromSource(PublisherSource<T> source)
Converts the provided
PublisherSource into a Publisher . |
static <T> Single<T> |
fromSource(SingleSource<T> source)
Converts the provided
SingleSource into a Single . |
static CompletableSource |
toSource(Completable completable)
Converts the provided
Completable into a CompletableSource . |
static <T> PublisherSource<T> |
toSource(Publisher<T> publisher)
Converts the provided
Publisher into a PublisherSource . |
static <T> SingleSource<T> |
toSource(Single<T> single)
Converts the provided
Single into a SingleSource . |
public static <T> PublisherSource<T> toSource(Publisher<T> publisher)
Publisher
into a PublisherSource
.T
- Type of items emitted from the publisher
and the returned PublisherSource
.publisher
- Publisher
to convert to a PublisherSource
.PublisherSource
representation of the passed Publisher
.public static <T> SingleSource<T> toSource(Single<T> single)
Single
into a SingleSource
.T
- Type of items emitted from the single
and the returned SingleSource
.single
- Single
to convert to a SingleSource
.SingleSource
representation of the passed Single
.public static CompletableSource toSource(Completable completable)
Completable
into a CompletableSource
.completable
- Completable
to convert to a CompletableSource
.CompletableSource
representation of the passed Completable
.public static <T> Publisher<T> fromSource(PublisherSource<T> source)
PublisherSource
into a Publisher
.T
- Type of items emitted from the source
and the returned Publisher
.source
- PublisherSource
to convert to a Publisher
.Publisher
representation of the passed PublisherSource
.public static <T> Single<T> fromSource(SingleSource<T> source)
SingleSource
into a Single
.T
- Type of items emitted from the source
and the returned Single
.source
- SingleSource
to convert to a Single
.Single
representation of the passed SingleSource
.public static Completable fromSource(CompletableSource source)
CompletableSource
into a Completable
.source
- CompletableSource
to convert to a Completable
.Completable
representation of the passed CompletableSource
.