T - the type of element signaled.public abstract class SingleSubscriberPublisher<T> extends Object implements Publisher<T>
Publisher that only allows a single Subscriber.| Modifier and Type | Field and Description | 
|---|---|
| protected static Subscription | EMPTY_SUBSCRIPTION | 
| Constructor and Description | 
|---|
| SingleSubscriberPublisher() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Optional<Subscriber<? super T>> | currentSubscriber() | 
| protected abstract void | doSubscribe(Subscriber<? super T> subscriber)Override to implement  Publisher.subscribe(Subscriber). | 
| void | subscribe(Subscriber<? super T> subscriber) | 
protected static final Subscription EMPTY_SUBSCRIPTION
public final void subscribe(Subscriber<? super T> subscriber)
protected abstract void doSubscribe(Subscriber<? super T> subscriber)
Publisher.subscribe(Subscriber).subscriber - The subscriberPublisher.subscribe(Subscriber)protected Optional<Subscriber<? super T>> currentSubscriber()