Package org.apache.myfaces.push.cdi
Class WebsocketApplicationSessionHolder
- java.lang.Object
- 
- org.apache.myfaces.push.cdi.WebsocketApplicationSessionHolder
 
- 
 public final class WebsocketApplicationSessionHolder extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description WebsocketApplicationSessionHolder()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanaddOrUpdateSession(String channelToken, jakarta.websocket.Session session)static voidclearWebsocketSessionLRUCache()Removes the cached MetadataTarget instances in order to prevent a memory leak.static Queue<String>getRestoredQueue()static ConcurrentLRUCache<String,Reference<jakarta.websocket.Session>>getWebsocketSessionLRUCache()static voidinitWebsocketSessionLRUCache(ExternalContext context)static booleanremoveSession(String channelToken)Remove the Session associated to the channelToken.protected static Set<Future<Void>>send(String channelToken, Object message)
 
- 
- 
- 
Method Detail- 
getWebsocketSessionLRUCachepublic static ConcurrentLRUCache<String,Reference<jakarta.websocket.Session>> getWebsocketSessionLRUCache() 
 - 
initWebsocketSessionLRUCachepublic static void initWebsocketSessionLRUCache(ExternalContext context) 
 - 
clearWebsocketSessionLRUCachepublic static void clearWebsocketSessionLRUCache() Removes the cached MetadataTarget instances in order to prevent a memory leak.
 - 
addOrUpdateSessionpublic static boolean addOrUpdateSession(String channelToken, jakarta.websocket.Session session) 
 - 
removeSessionpublic static boolean removeSession(String channelToken) Remove 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-
- Returns:
 
 
- 
 
-