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 thesourceand the returnedPublisher.- Parameters:
source-Flow.Publisherto convert to aPublisher.- Returns:
- A
Publisherrepresentation of the passedFlow.Publisher.
-
toFlowPublisher
- Type Parameters:
T- Type of items emitted from thesourceand the returnedPublisher.- Parameters:
publisher-Publisherto convert to aPublisher.- Returns:
- A
Flow.Publisherrepresentation of the passedPublisher.
-
toFlowPublisher
- Type Parameters:
T- Type of items emitted from thesourceand the returnedFlow.Publisher.- Parameters:
source-PublisherSourceto convert to aFlow.Publisher.- Returns:
- A
Flow.Publisherrepresentation of the passedPublisherSource.
-