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.Subscriber
and 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
PublisherSource
adhere to the rules as specified for a Reactive StreamsPublisher
in Section 1 of the specifications.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PublisherSource.Processor<T,R>
APublisherSource.Processor
represents a processing stage that is both aPublisherSource
and aPublisherSource.Subscriber
and obeys the contracts of both.static interface
PublisherSource.Subscriber<T>
A subscriber of result(s) produced by aPublisherSource
.static interface
PublisherSource.Subscription
A subscription to control the signals emitted from aPublisherSource
to aPublisherSource.Subscriber
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
subscribe(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.
-
-