Class LoginStat

java.lang.Object
org.bgerp.servlet.user.LoginStat

public class LoginStat extends Object
List of logged in user sessions.
  • Method Details

    • getLoginStat

      public static LoginStat getLoginStat()
    • userLoggedIn

      public void userLoggedIn(javax.servlet.http.HttpSession session, User user, String ip)
      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.
    • getLoggedUserList

      public List<User> getLoggedUserList()
      Logged users ordered by first session login time.
      Returns:
    • getLoggedUserWithSessions

      public LinkedHashMap<User,List<UserSession>> getLoggedUserWithSessions()