|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.org.UserSessionManager
public class UserSessionManager
Maintains user sessions
| Field Summary | |
|---|---|
static short |
INFO
|
static short |
WARNING
|
| Constructor Summary | |
|---|---|
UserSessionManager()
|
|
| Method Summary | |
|---|---|
static boolean |
addPendingAction(short type,
java.lang.String id,
java.lang.String message)
Add a pending action to the user session which is visible later via an icon in the toolbar. |
void |
attributeAdded(javax.servlet.http.HttpSessionBindingEvent arg0)
|
void |
attributeRemoved(javax.servlet.http.HttpSessionBindingEvent arg0)
|
void |
attributeReplaced(javax.servlet.http.HttpSessionBindingEvent ev)
|
static void |
deleteUserSessions(int days)
Delete all sessions older than the given dates |
static void |
dumpSessions()
on shutdown dump the last access dates |
static java.util.Vector |
getActiveSessions()
return the list of users currently logged in |
static java.util.Vector |
getActiveSessions(java.lang.String node)
return the list of users currently logged in at a node |
static int |
getConcurrentUsers()
|
static java.lang.String |
getLoginMessage()
|
static int |
getMaxConcurrent(java.util.Date since,
java.util.Date until)
|
static IUserSession |
getSessionById(java.lang.String sessionId)
called when session are read from dumped file after restart. |
static java.util.Vector |
getSessions(java.lang.Boolean active,
java.util.Date since,
java.util.Date until,
com.dec.avw.core.User u)
the sessions selected by date and/or user |
static void |
init()
|
static void |
initSessions()
On startup set namedUsers and put user session in httpSessions |
static boolean |
isLoggedIn(com.dec.avw.core.User user)
|
static boolean |
isLoginAllowed()
|
static java.lang.String |
login(com.dec.avw.core.User user,
java.lang.String ip)
Called on login of a user |
static void |
logout(java.lang.String sessionId)
End the session with the given session id (if session is already finished, do nothing). |
static void |
relogin(java.lang.String sessionId)
called when session are read from dumped file after restart. |
static void |
removeInactiveSessions()
Performs a logout for all users, where the http session is expired. |
static void |
removePendingAction(short type,
java.lang.String id)
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent e)
|
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent e)
|
static void |
setLoginAllowed(boolean allow,
java.lang.String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static short INFO
public static short WARNING
| Constructor Detail |
|---|
public UserSessionManager()
| Method Detail |
|---|
public static void init()
public static java.lang.String login(com.dec.avw.core.User user,
java.lang.String ip)
public static IUserSession getSessionById(java.lang.String sessionId)
throws java.lang.Exception
java.lang.Exception
public static void relogin(java.lang.String sessionId)
throws java.lang.Exception
java.lang.Exception
public static void logout(java.lang.String sessionId)
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Vector getActiveSessions()
public static java.util.Vector getActiveSessions(java.lang.String node)
public static int getMaxConcurrent(java.util.Date since,
java.util.Date until)
public static java.util.Vector getSessions(java.lang.Boolean active,
java.util.Date since,
java.util.Date until,
com.dec.avw.core.User u)
public static boolean isLoggedIn(com.dec.avw.core.User user)
public static void setLoginAllowed(boolean allow,
java.lang.String message)
throws java.io.IOException
java.io.IOExceptionpublic static int getConcurrentUsers()
public static boolean isLoginAllowed()
public static java.lang.String getLoginMessage()
public static void removeInactiveSessions()
public static void initSessions()
public static void dumpSessions()
throws java.lang.Exception
java.lang.Exceptionpublic void sessionCreated(javax.servlet.http.HttpSessionEvent e)
sessionCreated in interface javax.servlet.http.HttpSessionListenerpublic void sessionDestroyed(javax.servlet.http.HttpSessionEvent e)
sessionDestroyed in interface javax.servlet.http.HttpSessionListenerpublic void attributeAdded(javax.servlet.http.HttpSessionBindingEvent arg0)
attributeAdded in interface javax.servlet.http.HttpSessionAttributeListenerpublic void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent arg0)
attributeRemoved in interface javax.servlet.http.HttpSessionAttributeListenerpublic void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent ev)
attributeReplaced in interface javax.servlet.http.HttpSessionAttributeListener
public static void deleteUserSessions(int days)
throws java.lang.Exception
java.lang.Exception
public static boolean addPendingAction(short type,
java.lang.String id,
java.lang.String message)
type - either INFO or WARNINGid - the id of the action, it is used to remove actions.message - the already translated message a HTML text
public static void removePendingAction(short type,
java.lang.String id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||