|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.concurrent.SessionRegistryImpl
public class SessionRegistryImpl
Base implementation of SessionRegistry which also listens for
HttpSessionDestroyedEvents
published in the Spring application context.
NB: It is important that you register the HttpSessionEventPublisher in
web.xml so that this class is notified of sessions that
expire.
| Constructor Summary | |
|---|---|
SessionRegistryImpl()
|
|
| Method Summary | |
|---|---|
SessionInformation[] |
getAllSessions(Object principal)
Obtains all the known sessions for the specified principal. |
SessionInformation |
getSessionInformation(String sessionId)
Obtains the session information for the specified sessionId. |
void |
onApplicationEvent(ApplicationEvent event)
|
void |
refreshLastRequest(String sessionId)
Updates the given sessionId so its last request time is
equal to the present date and time. |
void |
registerNewSession(String sessionId,
Object principal)
Registers a new session for the specified principal. |
void |
removeSessionInformation(String sessionId)
Deletes all the session information being maintained for the specified sessionId. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionRegistryImpl()
| Method Detail |
|---|
public SessionInformation[] getAllSessions(Object principal)
SessionRegistry
getAllSessions in interface SessionRegistryprincipal - to locate sessions for (should never be
null)
null if none were foundpublic SessionInformation getSessionInformation(String sessionId)
SessionRegistrysessionId. Even expired sessions are returned (although
destroyed sessions are never returned).
getSessionInformation in interface SessionRegistrysessionId - to lookup (should never be null)
null if not foundpublic void onApplicationEvent(ApplicationEvent event)
onApplicationEvent in interface ApplicationListenerpublic void refreshLastRequest(String sessionId)
SessionRegistrysessionId so its last request time is
equal to the present date and time. Silently returns if the given
sessionId cannot be found or the session is marked to expire.
refreshLastRequest in interface SessionRegistrysessionId - for which to update the date and time of the last
request (should never be null)
public void registerNewSession(String sessionId,
Object principal)
throws SessionAlreadyUsedException
SessionRegistry
registerNewSession in interface SessionRegistrysessionId - to associate with the principal (should never be
null)principal - to associate with the session (should never be
null)
SessionAlreadyUsedException - DOCUMENT ME!public void removeSessionInformation(String sessionId)
SessionRegistrysessionId. If the sessionId is not found, the
method gracefully returns.
removeSessionInformation in interface SessionRegistrysessionId - to delete information for (should never be
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||