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 TypeMethodDescriptionvoid
Callback to signal completion of thePublisherSource
for thisSubscriber
.void
Callback to receive anerror
for thisSubscriber
.void
Callback to receive adata
element for thisSubscriber
.void
onSubscribe
(PublisherSource.Subscription subscription) Callback to receive aPublisherSource.Subscription
for thisSubscriber
.
-
Method Details
-
onSubscribe
Callback to receive aPublisherSource.Subscription
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
subscription
-PublisherSource.Subscription
for thisSubscriber
.
-
onNext
Callback to receive adata
element for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
t
- Adata
element.
-
onError
Callback to receive anerror
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Parameters:
t
-error
for thisSubscriber
.
-
onComplete
void onComplete()Callback to signal completion of thePublisherSource
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
-