Package io.servicetalk.concurrent
Interface PublisherSource.Subscriber<T>
- Type Parameters:
T- Type of items received by thisSubscriber.
- All Known Subinterfaces:
PublisherSource.Processor<T,R>
- All Known Implementing Classes:
CancelImmediatelySubscriber,ConcurrentTerminalSubscriber,LatestValueSubscriber,TestPublisherSubscriber
- Enclosing interface:
- PublisherSource<T>
public static interface PublisherSource.Subscriber<T>
A subscriber of result(s) produced by a
PublisherSource.
This is a replica of the APIs provided by
Reactive Streams and follows the
Reactive Streams specifications.
All implementations of this Subscriber adhere to the rules as specified for a Reactive Streams
Subscriber in
Section 2 of the specifications.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback to signal completion of thePublisherSourcefor thisSubscriber.voidCallback to receive anerrorfor thisSubscriber.voidCallback to receive adataelement for thisSubscriber.voidonSubscribe(PublisherSource.Subscription subscription) Callback to receive aPublisherSource.Subscriptionfor thisSubscriber.
-
Method Details
-
onSubscribe
Callback to receive aPublisherSource.Subscriptionfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
subscription-PublisherSource.Subscriptionfor thisSubscriber.
-
onNext
Callback to receive adataelement for thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
t- Adataelement.
-
onError
Callback to receive anerrorfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
t-errorfor thisSubscriber.
-
onComplete
void onComplete()Callback to signal completion of thePublisherSourcefor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
-