Class AbstractListenerWebSocketSession.WebSocketSendProcessor
java.lang.Object
org.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
org.springframework.web.reactive.socket.adapter.AbstractListenerWebSocketSession.WebSocketSendProcessor
- All Implemented Interfaces:
Processor<WebSocketMessage,
,Void> Publisher<Void>
,Subscriber<WebSocketMessage>
- Enclosing class:
- AbstractListenerWebSocketSession<T>
protected final class AbstractListenerWebSocketSession.WebSocketSendProcessor
extends org.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
Processor to send web socket messages.
-
Field Summary
Fields inherited from class org.springframework.http.server.reactive.AbstractListenerWriteProcessor
rsWriteLogger
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
discardData
(WebSocketMessage message) protected boolean
isDataEmpty
(WebSocketMessage message) protected boolean
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) Methods inherited from class org.springframework.http.server.reactive.AbstractListenerWriteProcessor
cancel, dataReceived, getLogPrefix, onComplete, onError, onNext, onSubscribe, onWritePossible, subscribe, writingComplete, writingFailed, writingPaused
-
Method Details
-
write
- Specified by:
write
in classorg.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
- Throws:
IOException
-
isDataEmpty
- Specified by:
isDataEmpty
in classorg.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
-
isWritePossible
protected boolean isWritePossible()- Specified by:
isWritePossible
in classorg.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
-
setReadyToSend
public 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. -
discardData
- Specified by:
discardData
in classorg.springframework.http.server.reactive.AbstractListenerWriteProcessor<WebSocketMessage>
-