public static interface MatsSocketServer.MatsSocketSession
data store
when gotten via
MatsSocketServer.getMatsSocketSessions(boolean, String, String, String)
(returning MatsSocketSessionDto
), or an ActiveMatsSocketSession
representing an active
MatsSocketSession connected to this node of the MatsSocketServer instance when gotten via
MatsSocketServer.getActiveMatsSocketSessions()
(returning ActiveMatsSocketSessionDto
),
or a LiveMatsSocketSession
which is an interface view over the actual live session
in the MatsSocketServer when gotten via MatsSocketServer.getLiveMatsSocketSessions()
.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppName()
Note: Do realize that it is the Client that specifies this value, there is no restriction and you cannot
trust that this String falls within your expected values.
|
java.lang.String |
getAppVersion()
Note: Do realize that it is the Client that specifies this value, there is no restriction and you cannot
trust that this String falls within your expected values.
|
java.lang.String |
getClientLibAndVersions()
Note: Do realize that it is the Client that specifies this value, there is no restriction and you cannot
trust that this String falls within your expected values.
|
java.lang.String |
getMatsSocketSessionId() |
java.util.Optional<java.lang.String> |
getNodeName() |
java.time.Instant |
getSessionCreatedTimestamp() |
java.time.Instant |
getSessionLivelinessTimestamp() |
java.lang.String |
getUserId() |
java.lang.String getMatsSocketSessionId()
java.lang.String getUserId()
java.time.Instant getSessionCreatedTimestamp()
MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType.DEREGISTER
and MatsSocketServer.SessionEstablishedEvent.SessionEstablishedEventType.RECONNECT
, as
MatsSocketServer.ActiveMatsSocketSession.getSessionEstablishedTimestamp()
does.java.time.Instant getSessionLivelinessTimestamp()
MatsSocketServer.ActiveMatsSocketSessionDto
, effectively returns
System.currentTimeMillis()
of when
MatsSocketServer.getActiveMatsSocketSessions()
was invoked, as it was live at the time of
invocation). If this is an instance of MatsSocketServer.LiveMatsSocketSession
, it literally returns
System.currentTimeMillis()
, as it is live right now. If this is an instance of
MatsSocketServer.MatsSocketSessionDto
, the reason you have this instance is that its contents was read from
the data store
using
MatsSocketServer.getMatsSocketSessions(boolean, String, String, String)
, and then this method
returns last "liveliness update" from the data store, which is the last time this MatsSocketSession
registered (i.e. became SESSION_ESTABLISHED), or from later periodic updates every few minutes while
it is/was active.java.lang.String getClientLibAndVersions()
"MatsSocket.js,v0.10.0; User-Agent: {userAgentString}"
, or
"MatsSocket.js,v0.10.0; Node.js: {node version}"
. For MatsSocket.dart, it could read
"MatsSocket.dart,v0.10.0; Dart: {dart version}; Flutter: {flutter SDK version}"
, or
"MatsSocket.dart,v0.10.0; Dart: {dart version}; User-Agent: {userAgentString}"
java.lang.String getAppName()
java.lang.String getAppVersion()
java.util.Optional<java.lang.String> getNodeName()
LiveMatsSocketSession
if it is
active (i.e. state=SESSION_ESTABLISHED
),
Optional.empty()
if not active. Will always return non-empty on an
MatsSocketServer.ActiveMatsSocketSession
and MatsSocketServer.LiveMatsSocketSession
instance.