private final class AbstractListenerWebSocketSession.WebSocketReceivePublisher extends AbstractListenerReadPublisher<WebSocketMessage>
Modifier and Type | Field and Description |
---|---|
private java.util.Queue<java.lang.Object> |
pendingMessages |
logger
Modifier | Constructor and Description |
---|---|
private |
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. |
(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.
|
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)