Session represents user’s subscription to a set of topics. This set is immutable, so new session should be created if user wants to add/remove subscriptions to some topics.
Session does multiplexing for messages from several topics, so that only a single client connection is required to for data transfer.
When session is created, it is getting unique UUID identifier, that client uses to communicate to that session.
When client is subscribed to a set of topics associated with some session, session fires SessionPreSubscriptionEvent, so that application developer can control subscriptions according to access rights.
Session is kept alive for ( {@link #getMaxInactiveInterval()}) minutes since the last time it has been accessed. Note that push can work in either polling (long polling) and persistent connection (WebSocket) modes, so session should be kept-alive correctly in both cases.
@author Nick Belaevski
|
|
|
|
|
|