Publisher
A Publisher that supports a single Subscriber at a time.
| Modifier and Type | Field and Description |
|---|---|
| private final AutoLock | |
| private static final Logger | |
| private Subscriber |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements org. Publisher to stop sending data and clean up resources.
|
| protected void | |
| protected void | |
| protected void | |
| protected AutoLock | |
| protected void | |
| protected abstract void | |
| public void | request(long
the strictly positive number of elements to requests to the upstream n)PublisherImplements org. Publisher until demand is signaled via this method.
|
| private void | |
| public void | subscribe(Subscriber<? super T>
the subscriber)Subscriber that will consume signals from this PublisherImplements org. Publisher to start streaming data.
|
| protected Subscriber | |
| public String |
| lock | back to summary |
|---|---|
| private final AutoLock lock | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| subscriber | back to summary |
|---|---|
| private Subscriber<? super T> subscriber | |
| AbstractSinglePublisher | back to summary |
|---|---|
| public AbstractSinglePublisher() | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org. Doc from org. Request the Data may still be sent to meet previously signalled demand after calling cancel.
| |
| emitOnComplete | back to summary |
|---|---|
| protected void emitOnComplete(Subscriber<? super T> subscriber) | |
| emitOnError | back to summary |
|---|---|
| protected void emitOnError(Subscriber<? super T> subscriber, Throwable failure) | |
| emitOnNext | back to summary |
|---|---|
| protected void emitOnNext(Subscriber<? super T> subscriber, T item) | |
| lock | back to summary |
|---|---|
| protected AutoLock lock() | |
| onFailure | back to summary |
|---|---|
| protected void onFailure(Subscriber<? super T> subscriber, Throwable failure) | |
| onRequest | back to summary |
|---|---|
| protected abstract void onRequest(Subscriber<? super T> subscriber, long n) | |
| request | back to summary |
|---|---|
| public void request(long n) Implements org. Doc from org. No events will be sent by a
It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more,
it may be treated by the
Whatever has been requested can be sent by the
A | |
| reset | back to summary |
|---|---|
| private void reset() | |
| subscribe | back to summary |
|---|---|
| public void subscribe(Subscriber<? super T> subscriber) Implements org. Doc from org. Request
This is a "factory method" and can be called multiple times, each time starting a new
Each
A
If the
| |
| subscriber | back to summary |
|---|---|
| protected Subscriber | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |