Class TeamAppsUiSessionManager

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionListener, UiCommandExecutor

    public class TeamAppsUiSessionManager
    extends java.lang.Object
    implements UiCommandExecutor, javax.servlet.http.HttpSessionListener
    Implements a cache for TeamAppsUiSessionManager.UiSession instances.

    It takes care of the removal of timed-out sessions. The "last used" information is updated every time a session is retrieved.

    • Constructor Detail

      • TeamAppsUiSessionManager

        public TeamAppsUiSessionManager​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • TeamAppsUiSessionManager

        public TeamAppsUiSessionManager​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                        UiSessionListener uiSessionListener)
    • Method Detail

      • setUiSessionListener

        public void setUiSessionListener​(UiSessionListener uiSessionListener)
      • initSession

        public void initSession​(QualifiedUiSessionId sessionId,
                                org.teamapps.dto.UiClientInfo clientInfo,
                                int maxRequestedCommandId,
                                MessageSender messageSender)
      • handleEvent

        public void handleEvent​(QualifiedUiSessionId sessionId,
                                int clientMessageId,
                                org.teamapps.dto.UiEvent event)
      • handleCommandResult

        public void handleCommandResult​(QualifiedUiSessionId sessionId,
                                        int clientMessageId,
                                        int cmdId,
                                        java.lang.Object result)
      • reinitSession

        public void reinitSession​(QualifiedUiSessionId sessionId,
                                  int lastReceivedCommandId,
                                  int maxRequestedCommandId,
                                  MessageSender messageSender)
      • handleCommandRequest

        public void handleCommandRequest​(QualifiedUiSessionId qualifiedUiSessionId,
                                         int lastReceivedCommandId,
                                         int maxRequestedCommandId)
      • sessionCreated

        public void sessionCreated​(javax.servlet.http.HttpSessionEvent se)
        Specified by:
        sessionCreated in interface javax.servlet.http.HttpSessionListener
      • sessionDestroyed

        public void sessionDestroyed​(javax.servlet.http.HttpSessionEvent se)
        Specified by:
        sessionDestroyed in interface javax.servlet.http.HttpSessionListener
      • removeAllSessionsForHttpSession

        public void removeAllSessionsForHttpSession​(java.lang.String httpSessionId)
      • removeTimedOutSessions

        public void removeTimedOutSessions​(long timeoutMilliSeconds)
      • destroy

        public void destroy()