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
Subscriber
adhere to the rules as specified for a Reactive StreamsSubscriber
in Section 2 of the specifications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onComplete()
Callback to signal completion of thePublisherSource
for thisSubscriber
.void
onError(java.lang.Throwable t)
Callback to receive anerror
for thisSubscriber
.void
onNext(T t)
Callback to receive adata
element for thisSubscriber
.void
onSubscribe(PublisherSource.Subscription subscription)
Callback to receive aPublisherSource.Subscription
for thisSubscriber
.
-
-
-
Method Detail
-
onSubscribe
void onSubscribe(PublisherSource.Subscription subscription)
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
void onNext(@Nullable T t)
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
void onError(java.lang.Throwable t)
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.
-
-