Enum Class MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType

java.lang.Object
java.lang.Enum<MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType>
io.mats3.matssocket.MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType
All Implemented Interfaces:
Serializable, Comparable<MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType>, Constable
Enclosing interface:
MatsSocketServer.SessionRemovedEvent

public static enum MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType extends Enum<MatsSocketServer.SessionRemovedEvent.SessionRemovedEventType>
Type of "remove": Either DEREGISTER, CLOSE or TIMEOUT. You may get one or several invocations for a session: You may get a CLOSE by itself: The user has logged in, does some stuff, and then "logs out" / closes the browser tab (i.e. invoking client.close()), thus actively closing the session explicitly. Or, you may first get a DEREGISTER e.g. due to the Client driving through a tunnel and loosing connection, in which case the most likely result is (hopefully) that the Client again SessionEstablishedEventType.RECONNECT - but if not, the Server may shortly get a CLOSE - or much later a TIMEOUT. This means that the session may alter back and forth between DEREGISTER and RECONNECT multiple times, but will always eventually get a CLOSE or TIMEOUT.