Interface MatsSocketServer.LiveMatsSocketSession

All Superinterfaces:
MatsSocketServer.ActiveMatsSocketSession, MatsSocketServer.MatsSocketSession
Enclosing interface:

public static interface MatsSocketServer.LiveMatsSocketSession extends MatsSocketServer.ActiveMatsSocketSession
A live representation of a MatsSocketSession.

Note: The difference between "active" and "live" is that the "active" are dumb "data transfer objects" (DTOs) which will serialize nicely with both Mats and MatsSocket field-based serialization mechanisms, while the "live" are an interface to the actual live sessions in the MatsSocketServer, and as such has more information - but cannot be (easily) serialized, and not passed as in- or out objects on Mats endpoints.

NOTE: The underlying instance is live in that it is just an interface over the live representation which the MatsSocketServer is using to hold the MatsSocketSession. As such, most methods can return different values between each time you invoke them - and there is no synchronization between the methods, so you could read ACTIVE using getState(), but when you read MatsSocketServer.ActiveMatsSocketSession.getAuthorization(), it could return Optional.empty() - because the user concurrently closed the session (and if reading getState() again, it would now return CLOSED).