Package org.glassfish.tyrus.core.cluster
Interface DistributedSession
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,Session
- All Known Implementing Classes:
RemoteSession
,TyrusSession
public interface DistributedSession extends Session
ExtendedSession
which adds distributed properties.- Author:
- Pavel Bucek
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getDistributedProperties()
Get distributed properties.-
Methods inherited from interface jakarta.websocket.Session
addMessageHandler, addMessageHandler, addMessageHandler, close, close, getAsyncRemote, getBasicRemote, getContainer, getId, getMaxBinaryMessageBufferSize, getMaxIdleTimeout, getMaxTextMessageBufferSize, getMessageHandlers, getNegotiatedExtensions, getNegotiatedSubprotocol, getOpenSessions, getPathParameters, getProtocolVersion, getQueryString, getRequestParameterMap, getRequestURI, getUserPrincipal, getUserProperties, isOpen, isSecure, removeMessageHandler, setMaxBinaryMessageBufferSize, setMaxIdleTimeout, setMaxTextMessageBufferSize
-
-
-
-
Method Detail
-
getDistributedProperties
java.util.Map<java.lang.String,java.lang.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
orRemoteSession
).Please note that when not running in the distributed environment, this map behaves similarly to
Session.getUserProperties()
, so no serialization or deserialization is performed when values are read from or stored to the returned map.- Returns:
- map of distributed properties.
- See Also:
TyrusSession
,RemoteSession
-
-