Package com.kheops.jmap.server
Class JMapServerSessionManager
java.lang.Object
com.kheops.jmap.server.JMapServerSessionManager
- All Implemented Interfaces:
JMapServerSessionCtrl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSessionListener
(JMapServerSessionListener listener) void
void
closeSession
(int sessionId) int
Map
<SessionType, com.kheops.jmap.server.JMapServerSessionManager.SessionCount> int
Returns the current reserved session count.getSession
(int sessionId) int
int
getSessionCount
(SessionType sessionType, boolean concurrent) Returns the session count for the specified session type.getSessionUser
(int sessionId) int
boolean
isMaxSessionCountExceeded
(int sessionId) boolean
isSystemSessionId
(int id) boolean
isSystemUser
(User user) openSession
(User user, InetAddress clientAddress, SessionType sessionType, int options) void
boolean
sessionExists
(int sessionId) void
setSessionLastRequestTime
(int sessionId) void
setSessionProjectId
(int sessionId, int projectId)
-
Method Details
-
getSystemSessionId
public int getSystemSessionId() -
isSystemUser
-
openSession
public JMapServerSessionStatus openSession(User user, InetAddress clientAddress, SessionType sessionType, int options) -
sessionExists
public boolean sessionExists(int sessionId) -
getSessionUser
- Specified by:
getSessionUser
in interfaceJMapServerSessionCtrl
-
getSession
-
setSessionLastRequestTime
public void setSessionLastRequestTime(int sessionId) -
setSessionProjectId
public void setSessionProjectId(int sessionId, int projectId) -
isMaxSessionCountExceeded
public boolean isMaxSessionCountExceeded(int sessionId) -
getCurrentSessionCount
public Map<SessionType,com.kheops.jmap.server.JMapServerSessionManager.SessionCount> getCurrentSessionCount() -
getSessionCount
public int getSessionCount() -
getConcurrentSessionCount
public int getConcurrentSessionCount() -
getReservedSessionCount
public int getReservedSessionCount()Returns the current reserved session count.- Returns:
- the session count.
-
getSessionCount
Returns the session count for the specified session type.- Parameters:
sessionType
- the session type to filter.concurrent
- if true, searches for concurrent sessions, otherwise searches for reserved sessions.- Returns:
- the session count.
-
closeSession
public void closeSession(int sessionId) -
closeAllSessions
public void closeAllSessions() -
getCurrentSessions
-
getCurrentSessionsInfos
-
addSessionListener
- Specified by:
addSessionListener
in interfaceJMapServerSessionCtrl
-
removeSessionListener
- Specified by:
removeSessionListener
in interfaceJMapServerSessionCtrl
-
isSystemSessionId
public boolean isSystemSessionId(int id) - Specified by:
isSystemSessionId
in interfaceJMapServerSessionCtrl
-