T - the type of element signaled to the SubscriberR - the type of element signaled by the Publisherpublic abstract class SingleSubscriberProcessor<T,R> extends CompletionAwareSubscriber<T> implements org.reactivestreams.Processor<T,R>
A Processor that only allows a single Subscriber
| Modifier and Type | Field and Description | 
|---|---|
protected static org.reactivestreams.Subscription | 
EMPTY_SUBSCRIPTION  | 
protected org.reactivestreams.Subscription | 
parentSubscription  | 
subscription| Constructor and Description | 
|---|
SingleSubscriberProcessor()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected java.util.Optional<org.reactivestreams.Subscriber<? super R>> | 
currentSubscriber()
Get the current  
Subscriber. | 
protected void | 
doAfterComplete()
Called after  
doOnComplete() completes. | 
protected void | 
doAfterOnError(java.lang.Throwable throwable)
Called after  
doOnError(Throwable) completes. | 
protected void | 
doAfterOnSubscribe(org.reactivestreams.Subscription subscription)
Called after  
doOnSubscribe(Subscription) completes. | 
protected void | 
doOnComplete()
Implement  
Subscriber.onComplete(). | 
protected void | 
doOnError(java.lang.Throwable t)
Implement  
Subscriber.onError(Throwable). | 
protected void | 
doOnSubscribe(org.reactivestreams.Subscription subscription)
Implement  
Subscriber.onSubscribe(Subscription). | 
protected void | 
doOnSubscribe(org.reactivestreams.Subscription subscription,
             org.reactivestreams.Subscriber<? super R> subscriber)
Perform the actual subscription to the subscriber. 
 | 
protected abstract void | 
doSubscribe(org.reactivestreams.Subscriber<? super R> subscriber)
Override to implement  
Publisher.subscribe(Subscriber). | 
protected org.reactivestreams.Subscriber<? super R> | 
getSubscriber()
Get the current  
Subscriber. | 
void | 
subscribe(org.reactivestreams.Subscriber<? super R> subscriber)  | 
doOnNext, isComplete, onComplete, onError, onNext, onSubscribeprotected static final org.reactivestreams.Subscription EMPTY_SUBSCRIPTION
protected org.reactivestreams.Subscription parentSubscription
public final void subscribe(org.reactivestreams.Subscriber<? super R> subscriber)
subscribe in interface org.reactivestreams.Publisher<R>protected abstract void doSubscribe(org.reactivestreams.Subscriber<? super R> subscriber)
Publisher.subscribe(Subscriber).subscriber - The subscriberPublisher.subscribe(Subscriber)protected org.reactivestreams.Subscriber<? super R> getSubscriber()
Subscriber.Subscriberjava.lang.IllegalStateException - if the subscriber is not presentprotected java.util.Optional<org.reactivestreams.Subscriber<? super R>> currentSubscriber()
Subscriber.Optional subscriberprotected void doAfterOnError(java.lang.Throwable throwable)
doOnError(Throwable) completes.throwable - The errorprotected void doAfterComplete()
doOnComplete() completes.protected void doAfterOnSubscribe(org.reactivestreams.Subscription subscription)
doOnSubscribe(Subscription) completes.subscription - subscriptionprotected void doOnSubscribe(org.reactivestreams.Subscription subscription,
                             org.reactivestreams.Subscriber<? super R> subscriber)
subscription - The subscriptionsubscriber - The subscriber (never null)protected final void doOnSubscribe(org.reactivestreams.Subscription subscription)
CompletionAwareSubscriberSubscriber.onSubscribe(Subscription).doOnSubscribe in class CompletionAwareSubscriber<T>subscription - The subscriptionprotected final void doOnError(java.lang.Throwable t)
CompletionAwareSubscriberSubscriber.onError(Throwable).doOnError in class CompletionAwareSubscriber<T>t - The throwableprotected void doOnComplete()
CompletionAwareSubscriberSubscriber.onComplete().doOnComplete in class CompletionAwareSubscriber<T>