Top Description Methods
org.glassfish.tyrus.core.cluster

public Interface DistributedSession

extends Session
Known Direct Implementers
org.glassfish.tyrus.core.cluster.RemoteSession, org.glassfish.tyrus.core.TyrusSession
Imports
java.io.Serializable, java.util.Map, jakarta.websocket.Session, org.glassfish.tyrus.core.TyrusSession

Extended Session which adds distributed properties.
Author
Pavel Bucek

Method Summary

Modifier and TypeMethod and Description
public Map<String, Object>

Returns:

map of distributed properties.
getDistributedProperties
()

Get distributed properties.

Inherited from jakarta.websocket.Session:
addMessageHandleraddMessageHandleraddMessageHandlercloseclosegetAsyncRemotegetBasicRemotegetContainergetIdgetMaxBinaryMessageBufferSizegetMaxIdleTimeoutgetMaxTextMessageBufferSizegetMessageHandlersgetNegotiatedExtensionsgetNegotiatedSubprotocolgetOpenSessionsgetPathParametersgetProtocolVersiongetQueryStringgetRequestParameterMapgetRequestURIgetUserPrincipalgetUserPropertiesisOpenisSecureremoveMessageHandlersetMaxBinaryMessageBufferSizesetMaxIdleTimeoutsetMaxTextMessageBufferSize

Method Detail

getDistributedPropertiesback to summary
public Map<String, Object> getDistributedProperties()

Get distributed properties.

Values put into this map must be Serializable or serializable by other, implementation-dependent alternative.

Content of this map is synchronized among all cluster nodes, so putting an entry on any of the nodes will be visible on all other nodes which have reference to current session (in form of TyrusSession or RemoteSession).

Please note that when not running in the distributed environment, this map behaves similarly to getUserProperties(), so no serialization or deserialization is performed when values are read from or stored to the returned map.

Returns:Map<String, Object>

map of distributed properties.

See Also
TyrusSession, RemoteSession