class WriteResultPublisher
extends java.lang.Object
ServerHttpResponse#writeWith(Publisher)
.Modifier and Type | Class and Description |
---|---|
private static class |
WriteResultPublisher.State
Represents a state for the
Publisher to be in. |
private static class |
WriteResultPublisher.WriteResultSubscription
Subscription to receive and delegate request and cancel signals from the
subscriber to this publisher.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
completedBeforeSubscribed |
private java.lang.Throwable |
errorBeforeSubscribed |
private static Log |
logger |
private java.util.concurrent.atomic.AtomicReference<WriteResultPublisher.State> |
state |
private <any> |
subscriber |
Constructor and Description |
---|
WriteResultPublisher() |
Modifier and Type | Method and Description |
---|---|
private boolean |
changeState(WriteResultPublisher.State oldState,
WriteResultPublisher.State newState) |
void |
publishComplete()
Invoke this to delegate a completion signal to the subscriber.
|
void |
publishError(java.lang.Throwable t)
Invoke this to delegate an error signal to the subscriber.
|
void |
subscribe(<any> subscriber) |
private static final Log logger
private final java.util.concurrent.atomic.AtomicReference<WriteResultPublisher.State> state
@Nullable private volatile <any> subscriber
private volatile boolean completedBeforeSubscribed
@Nullable private volatile java.lang.Throwable errorBeforeSubscribed
public final void subscribe(<any> subscriber)
public void publishComplete()
public void publishError(java.lang.Throwable t)
private boolean changeState(WriteResultPublisher.State oldState, WriteResultPublisher.State newState)