private final class AbstractListenerWebSocketSession.WebSocketReceivePublisher extends AbstractListenerReadPublisher<WebSocketMessage>
Modifier and Type | Field and Description |
---|---|
private java.util.Queue<java.lang.Object> |
pendingMessages |
rsReadLogger
Constructor and Description |
---|
WebSocketReceivePublisher() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkOnDataAvailable()
Check if data is available and either call
AbstractListenerReadPublisher.onDataAvailable()
immediately or schedule a notification. |
protected void |
discardData()
Invoked after an I/O read error from the underlying server or after a
cancellation signal from the downstream consumer to allow sub-classes
to discard any current cached data they might have.
|
(package private) void |
handleMessage(WebSocketMessage message) |
protected WebSocketMessage |
read()
Read once from the input, if possible.
|
protected void |
readingPaused()
Invoked when reading is paused due to a lack of demand.
|
getLogPrefix, onAllDataRead, onDataAvailable, onError, subscribe
protected void checkOnDataAvailable()
AbstractListenerReadPublisher
AbstractListenerReadPublisher.onDataAvailable()
immediately or schedule a notification.checkOnDataAvailable
in class AbstractListenerReadPublisher<WebSocketMessage>
protected void readingPaused()
AbstractListenerReadPublisher
Note: This method is guaranteed not to compete with
AbstractListenerReadPublisher.checkOnDataAvailable()
so it can be used to safely suspend
reading, if the underlying API supports it, i.e. without competing with
an implicit call to resume via checkOnDataAvailable()
.
readingPaused
in class AbstractListenerReadPublisher<WebSocketMessage>
@Nullable protected WebSocketMessage read() throws java.io.IOException
AbstractListenerReadPublisher
read
in class AbstractListenerReadPublisher<WebSocketMessage>
null
java.io.IOException
void handleMessage(WebSocketMessage message)
protected void discardData()
AbstractListenerReadPublisher
discardData
in class AbstractListenerReadPublisher<WebSocketMessage>