Class WebsocketApplicationSessionHolder


  • public final class WebsocketApplicationSessionHolder
    extends Object
    • Constructor Detail

      • WebsocketApplicationSessionHolder

        public WebsocketApplicationSessionHolder()
    • Method Detail

      • initWebsocketSessionLRUCache

        public static void initWebsocketSessionLRUCache​(ExternalContext context)
      • clearWebsocketSessionLRUCache

        public static void clearWebsocketSessionLRUCache()
        Removes the cached MetadataTarget instances in order to prevent a memory leak.
      • addOrUpdateSession

        public static boolean addOrUpdateSession​(String channelToken,
                                                 jakarta.websocket.Session session)
      • removeSession

        public 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:
      • getRestoredQueue

        public static Queue<String> getRestoredQueue()