Package io.servicetalk.concurrent
Interface PublisherSource<T>
-
- Type Parameters:
T- Type of the items emitted by thisPublisherSource.
- All Known Subinterfaces:
PublisherSource.Processor<T,R>
- All Known Implementing Classes:
SourceWrappers.PublisherSource,SubscribablePublisher,TestPublisher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PublisherSource<T>An asynchronous computation that emits zero or more items to itsPublisherSource.Subscriberand may or may not terminate successfully or with an error.This is a replica of the APIs provided by Reactive Streams and follows the Reactive Streams specifications. All implementations of this
PublisherSourceadhere to the rules as specified for a Reactive StreamsPublisherin Section 1 of the specifications.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePublisherSource.Processor<T,R>APublisherSource.Processorrepresents a processing stage that is both aPublisherSourceand aPublisherSource.Subscriberand obeys the contracts of both.static interfacePublisherSource.Subscriber<T>A subscriber of result(s) produced by aPublisherSource.static interfacePublisherSource.SubscriptionA subscription to control the signals emitted from aPublisherSourceto aPublisherSource.Subscriber.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsubscribe(PublisherSource.Subscriber<? super T> subscriber)Subscribe for the result(s) of thisPublisherSource.
-
-
-
Method Detail
-
subscribe
void subscribe(PublisherSource.Subscriber<? super T> subscriber)
Subscribe for the result(s) of thisPublisherSource.- Parameters:
subscriber- to subscribe for the result.
-
-