Package com.iizix.server.user
Class ActiveUserSessions
java.lang.Object
com.iizix.server.user.ActiveUserSessions
Handler class maintaining active user sessions.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- addUser- (ServerShell server, SessionInfo appSessionInfo, ClientParams clientParams) Requests adding a UserIdentifier as active session.- getAppSessionGyro- (ServerShell server, ClientParams clientParams) Gets the AppSessionGyro from an existing session.- intGets the current count of active application sessions.- intGets the currently open client session count.- intGets the current amount of different users connected.- intGets the peak count of active application sessions.- intGets the peak open client session count.- intGets the peak amount of different users.- getUserAppSession- (VSViewerParams params) Gets the application gyro for an application, user and session ID for the VS Viewer.- getUserAuthentication- (ClientParams params) Authenticate the session ID information without checking the password.Gets the user sessions open.- getUserSessions- (String appID, String userID) Gets the user session for a client session.- void- onAppSessionUserChanged- (AppSessionGyro appGyro) Called when the AppSessionGyro changes a user due to external login.
- Constructor Details- ActiveUserSessionspublic ActiveUserSessions()Constructor.
 
- Method Details- getCurrentUserCountpublic int getCurrentUserCount()Gets the current amount of different users connected. Each user may have several sessions open.- Returns:
- The number of concurrent users connected.
 
- getPeakUserCountpublic int getPeakUserCount()Gets the peak amount of different users. Each user may have several sessions open.- Returns:
- The number of peak concurrent users.
 
- getCurrentSessionCountpublic int getCurrentSessionCount()Gets the currently open client session count.- Returns:
- The count of the currently open sessions to the server, regardless of the same user.
 
- getPeakSessionCountpublic int getPeakSessionCount()Gets the peak open client session count.- Returns:
- The count of the peak open sessions to the server, regardless of the same user.
 
- getCurrentAppSessionCountpublic int getCurrentAppSessionCount()Gets the current count of active application sessions. The same user may run several apps and/or sessions at the same time.- Returns:
- The current amount of concurrent application sessions.
 
- getPeakAppSessionCountpublic int getPeakAppSessionCount()Gets the peak count of active application sessions. The same user may run several apps and/or sessions at the same time.- Returns:
- The peak amount of concurrent application sessions.
 
- getUserSessionsGets the user sessions open.- Returns:
- The UserSessions array.
 
- getUserSessionsGets the user session for a client session.- Parameters:
- appID- The application ID, or null for all application IDs.
- userID- The user ID, or null for all user IDs.
- Returns:
- A new list of user sessions.
 
- getUserAuthenticationAuthenticate the session ID information without checking the password.- Parameters:
- params- The client parameters.
- Returns:
- null If the user session is not found, otherwise the authentication result.
 
- getUserAppSessionGets the application gyro for an application, user and session ID for the VS Viewer.- Parameters:
- params- The VS Viewer parameters.
- Returns:
- The application gyro or null if not found.
 
- addUserpublic AppSessionGyro addUser- (ServerShell server, SessionInfo appSessionInfo, ClientParams clientParams) throws UserException Requests adding a UserIdentifier as active session. This can fail for the following reasons:- Parallel sessions are not allowed,
- Multiple independent sessions not allowed,
- FUTURE: User not allowed to run more than one application (not implemented yet).
 - It is assumed that the access of the UserIdentifier has been verified previously, i.e. this method does NOT verify User ID and Password. - Parameters:
- server- The server.
- appSessionInfo- The application session information.
- clientParams- The client parameters. If a new session is started, the- clientParamssession user identifier is updated to reflect the new session ID.
- Returns:
- A new or existing Gyro instance for the application session.
- Throws:
- UserException- If the user is not allowed access.
 
- getAppSessionGyroGets the AppSessionGyro from an existing session.- Parameters:
- server- The server instance.
- clientParams- The client parameters.
- Returns:
- The AppSession Gyro found, or null for none.
 
- onAppSessionUserChangedCalled when the AppSessionGyro changes a user due to external login.- Parameters:
- appGyro- The application session gyro instance.