Package org.bgerp.app.servlet.user
Class LoginStat
java.lang.Object
org.bgerp.app.servlet.user.LoginStat
List of logged in user sessions.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionWasCalled
(javax.servlet.http.HttpSession session) Updates session last activity time.static LoginStat
instance()
boolean
isSessionValid
(javax.servlet.http.HttpSession session) Checks if session is not timed out.void
sessionClosed
(javax.servlet.http.HttpSession session) Unregister user session.void
userLoggedIn
(javax.servlet.http.HttpSession session, User user, String ip) Registers user session after auth.
-
Method Details
-
instance
-
userLoggedIn
Registers user session after auth.- Parameters:
session
- HTTP session.user
- user.ip
- IP address.
-
sessionClosed
public void sessionClosed(javax.servlet.http.HttpSession session) Unregister user session.- Parameters:
session
- HTTP session.
-
actionWasCalled
public void actionWasCalled(javax.servlet.http.HttpSession session) Updates session last activity time.- Parameters:
session
- HTTP session.
-
isSessionValid
public boolean isSessionValid(javax.servlet.http.HttpSession session) Checks if session is not timed out.- Parameters:
session
- HTTP session.- Returns:
- last activity time is not older as timeout.
-
loggedUsers
- Returns:
- logged in users ordered by first session login time.
-
loggedUsersWithSessions
- Returns:
- logged in users with their sessions.
-