|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stratelia.silverpeas.peasCore.SessionManager
@Named(value="sessionManagement") public class SessionManager
Class declaration This object is a singleton used by SilverpeasSessionOpenener : when the user log in, ComponentRequestRouter : when the user access a component. It provides functions to manage the sessions, to write a log journal and getFactory informations about the logged users.
| Method Summary | |
|---|---|
void |
closeSession(String sessionId)
|
void |
doSessionManagement(Date currentDate)
This method is called every scheduledSessionManagementTimeStamp minute by the scheduler, it notify the user when timeout has expired and then invalidates the session if the user has not accessed the server. |
Collection<SessionInfo> |
getConnectedUsersList()
Gets all the connected users and the duration of their session. |
Collection<SessionInfo> |
getDistinctConnectedUsersList(UserDetail user)
Gets all the connected users and the duration of their session. |
int |
getNbConnectedUsersList(UserDetail user)
Gets number of connected users |
long |
getNextSessionTimeOut(String sessionKey)
|
SessionInfo |
getSessionInfo(String sessionId)
|
void |
initSessionManager()
Init attributes |
boolean |
isUserConnected(UserDetail user)
|
void |
jobFailed(SchedulerEvent anEvent)
|
void |
jobSucceeded(SchedulerEvent anEvent)
|
SessionInfo |
openAnonymousSession(javax.servlet.http.HttpServletRequest request)
|
SessionInfo |
openSession(UserDetail user)
This method is dedicated to the authentication for only accessing the WEB services published in Silverpeas. |
SessionInfo |
openSession(UserDetail user,
javax.servlet.http.HttpServletRequest request)
This method is dedicated to the authentication of users behind a WEB browser. |
void |
removeSession(String sessionId)
Remove a session and log session's data. |
void |
shutdown()
This method remove and invalidates all sessions. |
void |
triggerFired(SchedulerEvent anEvent)
|
SessionInfo |
validateSession(SessionValidationContext context)
|
SessionInfo |
validateSession(String sessionKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@PostConstruct public void initSessionManager()
public SessionInfo validateSession(String sessionKey)
validateSession in interface SessionManagementpublic SessionInfo validateSession(SessionValidationContext context)
validateSession in interface SessionManagementpublic void removeSession(String sessionId)
sessionId - identifierLogoutServletpublic void closeSession(String sessionId)
closeSession in interface SessionManagementpublic SessionInfo getSessionInfo(String sessionId)
getSessionInfo in interface SessionManagementpublic Collection<SessionInfo> getConnectedUsersList()
getConnectedUsersList in interface SessionManagementpublic Collection<SessionInfo> getDistinctConnectedUsersList(UserDetail user)
getDistinctConnectedUsersList in interface SessionManagementpublic int getNbConnectedUsersList(UserDetail user)
getNbConnectedUsersList in interface SessionManagementuser -
public void doSessionManagement(Date currentDate)
currentDate - the date when the method is called by the schedulerfor parameters, addSession, setLastAccesspublic void shutdown()
public void triggerFired(SchedulerEvent anEvent)
throws Exception
triggerFired in interface SchedulerEventListenerExceptionpublic void jobSucceeded(SchedulerEvent anEvent)
jobSucceeded in interface SchedulerEventListenerpublic void jobFailed(SchedulerEvent anEvent)
jobFailed in interface SchedulerEventListenerpublic SessionInfo openSession(UserDetail user)
openSession in interface SessionManagementuser - the user for which the session has to be opened
public SessionInfo openSession(UserDetail user,
javax.servlet.http.HttpServletRequest request)
openSession in interface SessionManagementuser - the user for which the session has to be openedrequest - the HTTP servlet request in which the authentication is performed.
public SessionInfo openAnonymousSession(javax.servlet.http.HttpServletRequest request)
openAnonymousSession in interface SessionManagementpublic boolean isUserConnected(UserDetail user)
isUserConnected in interface SessionManagementpublic long getNextSessionTimeOut(String sessionKey)
getNextSessionTimeOut in interface SessionManagement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||