public interface WebSocketListener
extends org.springframework.web.socket.SubProtocolCapable
WebSocketMessages messages as part of a higher
level protocol, referred to as "sub-protocol" in the WebSocket RFC specification.
Implementations of this interface can be configured on a
IntegrationWebSocketContainer which delegates messages and
WebSocketSession events to this implementation.
WebSocketInboundChannelAdapter| Modifier and Type | Method and Description |
|---|---|
void |
afterSessionEnded(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus)
Invoked after a
WebSocketSession has ended. |
void |
afterSessionStarted(org.springframework.web.socket.WebSocketSession session)
Invoked after a
WebSocketSession has started. |
void |
onMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.WebSocketMessage<?> message)
Handle the received
WebSocketMessage. |
void onMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.WebSocketMessage<?> message)
throws java.lang.Exception
WebSocketMessage.session - the WebSocket sessionmessage - the WebSocket messagejava.lang.Exception - the 'onMessage' Exceptionvoid afterSessionStarted(org.springframework.web.socket.WebSocketSession session)
throws java.lang.Exception
WebSocketSession has started.session - the WebSocket sessionjava.lang.Exception - the 'afterSessionStarted' Exceptionvoid afterSessionEnded(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus closeStatus)
throws java.lang.Exception
WebSocketSession has ended.session - the WebSocket sessioncloseStatus - the reason why the session was closedjava.lang.Exception - the 'afterSessionEnded' Exception