Class TeamAppsSessionManager
java.lang.Object
org.teamapps.uisession.TeamAppsSessionManager
- All Implemented Interfaces:
jakarta.servlet.http.HttpSessionListener,EventListener
public class TeamAppsSessionManager
extends Object
implements jakarta.servlet.http.HttpSessionListener
Implements a cache for
UiSession instances.
It takes care of the removal of timed-out sessions. The "last used" information is updated every time a session is retrieved.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTeamAppsSessionManager(TeamAppsConfiguration config, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SequentialExecutorFactory sessionExecutorFactory, WebController webController, IconProvider iconProvider, TeamAppsUploadManager uploadManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateSessionContext(UiSession uiSession, UiClientInfo uiClientInfo, jakarta.servlet.http.HttpSession httpSession, String navigationPathPrefix) voiddestroy()intintintintgetSessionContextById(String sessionId) getUiSessionById(String sessionId) intvoidinitSession(String sessionId, UiClientInfo clientInfo, jakarta.servlet.http.HttpSession httpSession, int maxRequestedCommandId, MessageSender messageSender) voidsessionCreated(jakarta.servlet.http.HttpSessionEvent se) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.http.HttpSessionListener
sessionDestroyed
-
Field Details
-
TEAMAPPS_VERSION_REFRESH_PARAMETER
- See Also:
-
onStatsUpdated
-
-
Constructor Details
-
TeamAppsSessionManager
public TeamAppsSessionManager(TeamAppsConfiguration config, com.fasterxml.jackson.databind.ObjectMapper objectMapper, SequentialExecutorFactory sessionExecutorFactory, WebController webController, IconProvider iconProvider, TeamAppsUploadManager uploadManager)
-
-
Method Details
-
getUiSessionById
-
getSessionContextById
-
getNumberOfSessions
public int getNumberOfSessions() -
getNumberOfSessionsByState
-
getAllSessions
-
getBufferedCommandsCount
public int getBufferedCommandsCount() -
getUnconsumedCommandsCount
public int getUnconsumedCommandsCount() -
getNumberOfAvailableClosedSessionStatistics
public int getNumberOfAvailableClosedSessionStatistics() -
getClosedSessionsStatistics
-
initSession
public void initSession(String sessionId, UiClientInfo clientInfo, jakarta.servlet.http.HttpSession httpSession, int maxRequestedCommandId, MessageSender messageSender) -
sessionCreated
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent se) - Specified by:
sessionCreatedin interfacejakarta.servlet.http.HttpSessionListener
-
updateSessionStates
public void updateSessionStates() -
destroy
public void destroy() -
createSessionContext
public SessionContext createSessionContext(UiSession uiSession, UiClientInfo uiClientInfo, jakarta.servlet.http.HttpSession httpSession, String navigationPathPrefix)
-