ServerHttpResponse#writeWith(Publisher).
| Modifier and Type | Class and Description |
|---|---|
| private static enum | WriteResultPublisher.
Represents a state for the
UNSUBSCRIBED
|
v
SUBSCRIBING
|
v
SUBSCRIBED
|
v
COMPLETED
|
| private static class | WriteResultPublisher.
Subscription to receive and delegate request and cancel signals from the subscriber to this publisher. |
| Modifier and Type | Field and Description |
|---|---|
| private final Runnable | |
| private volatile boolean | |
| private volatile Throwable | |
| private final String | |
| private static final Log | rsWriteResultLogger
Special logger for debugging Reactive Streams signals. |
| private final AtomicReference | |
| private volatile Subscriber |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| public void | |
| public void | |
| public final void | subscribe(Subscriber<? super Void>
the subscriber)Subscriber that will consume signals from this PublisherImplements org. Request |
| cancelTask | back to summary |
|---|---|
| private final Runnable cancelTask | |
| completedBeforeSubscribed | back to summary |
|---|---|
| private volatile boolean completedBeforeSubscribed | |
| errorBeforeSubscribed | back to summary |
|---|---|
| private volatile Throwable errorBeforeSubscribed
| |
| logPrefix | back to summary |
|---|---|
| private final String logPrefix | |
| rsWriteResultLogger | back to summary |
|---|---|
| private static final Log rsWriteResultLogger Special logger for debugging Reactive Streams signals. | |
| state | back to summary |
|---|---|
| private final AtomicReference<WriteResultPublisher. | |
| subscriber | back to summary |
|---|---|
| private volatile Subscriber<? super Void> subscriber
| |
| WriteResultPublisher | back to summary |
|---|---|
| public WriteResultPublisher(String logPrefix, Runnable cancelTask) | |
| changeState | back to summary |
|---|---|
| private boolean changeState(WriteResultPublisher. | |
| publishComplete | back to summary |
|---|---|
| public void publishComplete() Invoke this to delegate a completion signal to the subscriber. | |
| publishError | back to summary |
|---|---|
| public void publishError(Throwable t) Invoke this to delegate an error signal to the subscriber. | |
| subscribe | back to summary |
|---|---|
| public final void subscribe(Subscriber<? super Void> 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
| |
Publisher to be in.
UNSUBSCRIBED
|
v
SUBSCRIBING
|
v
SUBSCRIBED
|
v
COMPLETED
| Modifier and Type | Field and Description |
|---|---|
| public static final WriteResultPublisher. | |
| public static final WriteResultPublisher. | |
| public static final WriteResultPublisher. | |
| public static final WriteResultPublisher. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public static WriteResultPublisher. | |
| public static WriteResultPublisher. |
| COMPLETED | back to summary |
|---|---|
| public static final WriteResultPublisher. | |
| SUBSCRIBED | back to summary |
|---|---|
| public static final WriteResultPublisher. | |
| SUBSCRIBING | back to summary |
|---|---|
| public static final WriteResultPublisher. | |
| UNSUBSCRIBED | back to summary |
|---|---|
| public static final WriteResultPublisher. | |
| State | back to summary |
|---|---|
| private State() | |
| cancel | back to summary |
|---|---|
| pack-priv void cancel(WriteResultPublisher publisher) | |
| publishComplete | back to summary |
|---|---|
| pack-priv void publishComplete(WriteResultPublisher publisher) | |
| publishError | back to summary |
|---|---|
| pack-priv void publishError(WriteResultPublisher publisher, Throwable t) | |
| request | back to summary |
|---|---|
| pack-priv void request(WriteResultPublisher publisher, long n) | |
| subscribe | back to summary |
|---|---|
| pack-priv void subscribe(WriteResultPublisher publisher, Subscriber<? super Void> subscriber) | |
| valueOf | back to summary |
|---|---|
| public static WriteResultPublisher. | |
| values | back to summary |
|---|---|
| public static WriteResultPublisher. | |
| Modifier and Type | Field and Description |
|---|---|
| private final WriteResultPublisher |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | cancel()
Implements org. Request the |
| private WriteResultPublisher. | |
| public final void | request(long
the strictly positive number of elements to requests to the upstream n)PublisherImplements org. No events will be sent by a |
| publisher | back to summary |
|---|---|
| private final WriteResultPublisher publisher | |
| WriteResultSubscription | back to summary |
|---|---|
| public WriteResultSubscription(WriteResultPublisher publisher) | |
| cancel | back to summary |
|---|---|
| public final void cancel() Implements org. Doc from org. Request the Data may still be sent to meet previously signalled demand after calling cancel.
| |
| getState | back to summary |
|---|---|
| private WriteResultPublisher. | |
| request | back to summary |
|---|---|
| public final 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 | |