Top Description Methods
org.springframework.web.socket.adapter

public Interface NativeWebSocketSession

extends WebSocketSession
Known Direct Implementers
org.springframework.web.socket.sockjs.client.WebSocketClientSockJsSession, org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession, org.springframework.web.socket.adapter.AbstractWebSocketSession
Imports
org.springframework.lang.Nullable, org.springframework.web.socket.WebSocketSession

A WebSocketSession that exposes the underlying, native WebSocketSession through a getter.
Author
Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Object
getNativeSession()

Return the underlying native WebSocketSession.

public <T> T

Returns:

the native session of the required type, or null if not available
getNativeSession
(Class<T>
the required type of the session
requiredType
)

Return the underlying native WebSocketSession, if available.

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

Method Detail

getNativeSessionback to summary
public Object getNativeSession()

Return the underlying native WebSocketSession.

getNativeSessionback to summary
public <T> T getNativeSession(Class<T> requiredType)

Return the underlying native WebSocketSession, if available.

Parameters
requiredType:Class<T>

the required type of the session

Returns:T

the native session of the required type, or null if not available

Annotations
@Nullable