Package org.apache.myfaces.push.cdi
Class WebsocketSessionManager
java.lang.Object
org.apache.myfaces.push.cdi.WebsocketSessionManager
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddOrUpdateSession(String channelToken, jakarta.websocket.Session session) voidvoidderegisterUser(Serializable user, String channel, String channelToken) getChannelTokensForUser(Serializable user, String channel) ConcurrentLRUCache<String,Collection<Reference<jakarta.websocket.Session>>> voidinit()voidinitSessionMap(ExternalContext context) voidregisterSessionToken(String channelToken) voidregisterUser(Serializable user, String channel, String channelToken) voidremoveChannelToken(String channelToken) Remove the channelToken and close all sessions associated with it.voidremoveSession(String channelToken, jakarta.websocket.Session session) Remove the Session associated to the channelToken.void
- 
Constructor Details- 
WebsocketSessionManagerpublic WebsocketSessionManager()
 
- 
- 
Method Details- 
init@PostConstruct public void init()
- 
getSessionMap
- 
getUserMap
- 
registerSessionToken
- 
registerUser
- 
deregisterUser
- 
getChannelTokensForUser
- 
initSessionMap
- 
clearSessionspublic void clearSessions()
- 
addOrUpdateSession
- 
removeSessionRemove the Session associated to the channelToken. This happens when the websocket connection is closed. Please note the connection can be closed/reopened, so this method should not block another connection using the same channelToken. To destroy the channel token, WebsocketViewBean is used to destroy the channel token at view expiration time.- Parameters:
- channelToken-
- session-
 
- 
removeChannelTokenRemove the channelToken and close all sessions associated with it. Happens, when session scope or view scope is destroyed.- Parameters:
- channelToken-
 
- 
send
- 
synchronizeSessionInstancespublic void synchronizeSessionInstances()
- 
getRestoredQueue
 
-