Class JdkFlowAdapters
java.lang.Object
io.servicetalk.concurrent.jdkflow.JdkFlowAdapters
A set of adapter methods for converting to and from
JDK Flow
APIs and ServiceTalk APIs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Publisher<T>
fromFlowPublisher
(Flow.Publisher<T> source) static <T> Flow.Publisher<T>
toFlowPublisher
(Publisher<T> publisher) static <T> Flow.Publisher<T>
toFlowPublisher
(PublisherSource<T> source)
-
Method Details
-
fromFlowPublisher
- Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
source
-Flow.Publisher
to convert to aPublisher
.- Returns:
- A
Publisher
representation of the passedFlow.Publisher
.
-
toFlowPublisher
- Type Parameters:
T
- Type of items emitted from thesource
and the returnedPublisher
.- Parameters:
publisher
-Publisher
to convert to aPublisher
.- Returns:
- A
Flow.Publisher
representation of the passedPublisher
.
-
toFlowPublisher
- Type Parameters:
T
- Type of items emitted from thesource
and the returnedFlow.Publisher
.- Parameters:
source
-PublisherSource
to convert to aFlow.Publisher
.- Returns:
- A
Flow.Publisher
representation of the passedPublisherSource
.
-