public interface WebSocketListener extends 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(WebSocketSession session,
CloseStatus closeStatus)
Invoked after a
WebSocketSession has ended. |
void |
afterSessionStarted(WebSocketSession session)
Invoked after a
WebSocketSession has started. |
void |
onMessage(WebSocketSession session,
WebSocketMessage<?> message)
Handle the received
WebSocketMessage. |
getSubProtocolsvoid onMessage(WebSocketSession session, WebSocketMessage<?> message) throws java.lang.Exception
WebSocketMessage.session - the WebSocket sessionmessage - the WebSocket messagejava.lang.Exception - the 'onMessage' Exceptionvoid afterSessionStarted(WebSocketSession session) throws java.lang.Exception
WebSocketSession has started.session - the WebSocket sessionjava.lang.Exception - the 'afterSessionStarted' Exceptionvoid afterSessionEnded(WebSocketSession session, 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