Top Description Methods
org.springframework.web.socket.sockjs.transport

public Interface SockJsSession

extends WebSocketSession
Known Direct Implementers
org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession
Imports
org.springframework.web.socket.WebSocketSession

SockJS extension of Spring's standard WebSocketSession.
Authors
Juergen Hoeller, Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
disableHeartbeat()

Disable the SockJS heartbeat, presumably because a higher-level protocol has heartbeats enabled for the session already.

public long
getTimeSinceLastActive()

Return the time (in ms) since the session was last active, or otherwise if the session is new, then the time since the session was created.

Inherited from org.springframework.web.socket.WebSocketSession:
closeclosegetAcceptedProtocolgetAttributesgetBinaryMessageSizeLimitgetExtensionsgetHandshakeHeadersgetIdgetLocalAddressgetPrincipalgetRemoteAddressgetTextMessageSizeLimitgetUriisOpensendMessagesetBinaryMessageSizeLimitsetTextMessageSizeLimit

Method Detail

disableHeartbeatback to summary
public void disableHeartbeat()

Disable the SockJS heartbeat, presumably because a higher-level protocol has heartbeats enabled for the session already. It is not recommended to disable this otherwise, as it helps proxies to know the connection is not hanging.

getTimeSinceLastActiveback to summary
public long getTimeSinceLastActive()

Return the time (in ms) since the session was last active, or otherwise if the session is new, then the time since the session was created.