protected final class AbstractListenerWebSocketSession.WebSocketSendProcessor extends AbstractListenerWriteProcessor<WebSocketMessage>
rsWriteLogger
Modifier and Type | Method and Description |
---|---|
protected void |
discardData(WebSocketMessage message)
Invoked after any error (either from the upstream write Publisher, or
from I/O operations to the underlying server) and cancellation
to discard in-flight data that was in
the process of being written when the error took place.
|
protected boolean |
isDataEmpty(WebSocketMessage message)
Whether the given data item has any content to write.
|
protected boolean |
isWritePossible()
Whether writing is possible.
|
void |
setReadyToSend(boolean ready)
Subclasses can invoke this before sending a message (false) and
after receiving the async send callback (true) effective translating
async completion callback into simple flow control.
|
protected boolean |
write(WebSocketMessage message)
Write the given item.
|
cancel, dataReceived, getLogPrefix, onComplete, onError, onNext, onSubscribe, onWritePossible, subscribe, writingComplete, writingFailed, writingPaused
protected boolean write(WebSocketMessage message) throws IOException
AbstractListenerWriteProcessor
Note: Sub-classes are responsible for releasing any data buffer associated with the item, once fully written, if pooled buffers apply to the underlying container.
write
in class AbstractListenerWriteProcessor<WebSocketMessage>
message
- the item to writetrue
if the current data item was written completely and
a new item requested, or false
if it was written partially and
we'll need more write callbacks before it is fully writtenIOException
protected boolean isDataEmpty(WebSocketMessage message)
AbstractListenerWriteProcessor
isDataEmpty
in class AbstractListenerWriteProcessor<WebSocketMessage>
protected boolean isWritePossible()
AbstractListenerWriteProcessor
isWritePossible
in class AbstractListenerWriteProcessor<WebSocketMessage>
public void setReadyToSend(boolean ready)
protected void discardData(WebSocketMessage message)
AbstractListenerWriteProcessor
discardData
in class AbstractListenerWriteProcessor<WebSocketMessage>
message
- the data to be released