open class SockJsWebSocketHandler : TextWebSocketHandler, SubProtocolCapable
An implementation of WebSocketHandler that adds SockJS messages frames, sends SockJS heartbeat messages, and delegates lifecycle events and messages to a target WebSocketHandler.
Methods in this class allow exceptions from the wrapped WebSocketHandler to propagate. However, any exceptions resulting from SockJS message handling (e.g. while sending SockJS frames or heartbeat messages) are caught and treated as transport errors, i.e. routed to the handleTransportError method of the wrapped handler and the session closed.
Author
Rossen Stoyanchev
Since
4.0
SockJsWebSocketHandler(serviceConfig: SockJsServiceConfig, webSocketHandler: WebSocketHandler, sockJsSession: WebSocketServerSockJsSession) |
open fun afterConnectionClosed(wsSession: WebSocketSession, status: CloseStatus): Unit |
|
open fun afterConnectionEstablished(wsSession: WebSocketSession): Unit |
|
open fun getSubProtocols(): MutableList<String> |
|
open fun handleTextMessage(wsSession: WebSocketSession, message: TextMessage): Unit |
|
open fun handleTransportError(webSocketSession: WebSocketSession, exception: Throwable): Unit |