|
||||||||||
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 SessionManagement
public SessionInfo validateSession(SessionValidationContext context)
validateSession
in interface SessionManagement
public void removeSession(String sessionId)
sessionId
- identifierLogoutServlet
public void closeSession(String sessionId)
closeSession
in interface SessionManagement
public SessionInfo getSessionInfo(String sessionId)
getSessionInfo
in interface SessionManagement
public Collection<SessionInfo> getConnectedUsersList()
getConnectedUsersList
in interface SessionManagement
public Collection<SessionInfo> getDistinctConnectedUsersList(UserDetail user)
getDistinctConnectedUsersList
in interface SessionManagement
public int getNbConnectedUsersList(UserDetail user)
getNbConnectedUsersList
in interface SessionManagement
user
-
public void doSessionManagement(Date currentDate)
currentDate
- the date when the method is called by the schedulerfor parameters, addSession, setLastAccess
public void shutdown()
public void triggerFired(SchedulerEvent anEvent) throws Exception
triggerFired
in interface SchedulerEventListener
Exception
public void jobSucceeded(SchedulerEvent anEvent)
jobSucceeded
in interface SchedulerEventListener
public void jobFailed(SchedulerEvent anEvent)
jobFailed
in interface SchedulerEventListener
public SessionInfo openSession(UserDetail user)
openSession
in interface SessionManagement
user
- the user for which the session has to be opened
public SessionInfo openSession(UserDetail user, javax.servlet.http.HttpServletRequest request)
openSession
in interface SessionManagement
user
- 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 SessionManagement
public boolean isUserConnected(UserDetail user)
isUserConnected
in interface SessionManagement
public long getNextSessionTimeOut(String sessionKey)
getNextSessionTimeOut
in interface SessionManagement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |