Class SockJsWebSocketHandler

All Implemented Interfaces:
SubProtocolCapable, WebSocketHandler

public class SockJsWebSocketHandler extends TextWebSocketHandler implements 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.

Since:
4.0
Author:
Rossen Stoyanchev