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,DemandCheckingSubscriber,LatestValueSubscriber,LoggingPublisherSubscriber,TestPublisherSubscriber
- Enclosing interface:
- PublisherSource<T>
public static interface PublisherSource.Subscriber<T>A subscriber of result(s) produced by aPublisherSource.This is a replica of the APIs provided by Reactive Streams and follows the Reactive Streams specifications. All implementations of this
Subscriberadhere to the rules as specified for a Reactive StreamsSubscriberin Section 2 of the specifications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonComplete()Callback to signal completion of thePublisherSourcefor thisSubscriber.voidonError(java.lang.Throwable t)Callback to receive anerrorfor thisSubscriber.voidonNext(T t)Callback to receive adataelement for thisSubscriber.voidonSubscribe(PublisherSource.Subscription subscription)Callback to receive aPublisherSource.Subscriptionfor thisSubscriber.
-
-
-
Method Detail
-
onSubscribe
void onSubscribe(PublisherSource.Subscription subscription)
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
void onNext(@Nullable T t)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
void onError(java.lang.Throwable t)
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.
-
-