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