public static class MatsSocketServer.MatsSocketSessionDto extends java.lang.Object implements MatsSocketServer.MatsSocketSession
MatsSocketServer.MatsSocketSession
, which is serializable both for MatsSocket and Mats, i.e.
serialization mechanisms using field-based serialization.Modifier and Type | Field and Description |
---|---|
java.lang.String |
an |
java.lang.String |
av |
java.lang.String |
clv |
java.lang.String |
id |
java.lang.String |
nn |
long |
scts |
long |
slts |
java.lang.String |
uid |
Constructor and Description |
---|
MatsSocketSessionDto() |
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() |
public java.lang.String id
public java.lang.String uid
public long scts
public long slts
public java.lang.String clv
public java.lang.String an
public java.lang.String av
public java.lang.String nn
public java.lang.String getMatsSocketSessionId()
getMatsSocketSessionId
in interface MatsSocketServer.MatsSocketSession
public java.lang.String getUserId()
getUserId
in interface MatsSocketServer.MatsSocketSession
public java.time.Instant getSessionCreatedTimestamp()
getSessionCreatedTimestamp
in interface MatsSocketServer.MatsSocketSession
MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType.DEREGISTER
and MatsSocketServer.SessionEstablishedEvent.SessionEstablishedEventType.RECONNECT
, as
MatsSocketServer.ActiveMatsSocketSession.getSessionEstablishedTimestamp()
does.public java.time.Instant getSessionLivelinessTimestamp()
getSessionLivelinessTimestamp
in interface MatsSocketServer.MatsSocketSession
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.public java.lang.String getClientLibAndVersions()
MatsSocketServer.MatsSocketSession
getClientLibAndVersions
in interface MatsSocketServer.MatsSocketSession
"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}"
public java.lang.String getAppName()
MatsSocketServer.MatsSocketSession
getAppName
in interface MatsSocketServer.MatsSocketSession
public java.lang.String getAppVersion()
MatsSocketServer.MatsSocketSession
getAppVersion
in interface MatsSocketServer.MatsSocketSession
public java.util.Optional<java.lang.String> getNodeName()
getNodeName
in interface MatsSocketServer.MatsSocketSession
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.