org.acegisecurity.concurrent
Interface SessionRegistry

All Known Implementing Classes:
SessionRegistryImpl

public interface SessionRegistry

Maintains a registry of SessionInformation instances.

Version:
$Id: SessionRegistry.java,v 1.2 2005/11/17 00:55:56 benalex Exp $
Author:
Ben Alex

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 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.
 

Method Detail

getAllSessions

SessionInformation[] getAllSessions(Object principal)
Obtains all the known sessions for the specified principal. Sessions that have expired or destroyed are not returned.

Parameters:
principal - to locate sessions for (should never be null)
Returns:
the unexpired and undestroyed sessions for this principal, or null if none were found

getSessionInformation

SessionInformation getSessionInformation(String sessionId)
Obtains the session information for the specified sessionId. Even expired sessions are returned (although destroyed sessions are never returned).

Parameters:
sessionId - to lookup (should never be null)
Returns:
the session information, or null if not found

refreshLastRequest

void refreshLastRequest(String sessionId)
Updates the given sessionId 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.

Parameters:
sessionId - for which to update the date and time of the last request (should never be null)

registerNewSession

void registerNewSession(String sessionId,
                        Object principal)
                        throws SessionAlreadyUsedException
Registers a new session for the specified principal. The newly registered session will not be marked for expiration.

Parameters:
sessionId - to associate with the principal (should never be null)
principal - to associate with the session (should never be null)
Throws:
SessionAlreadyUsedException - DOCUMENT ME!

removeSessionInformation

void removeSessionInformation(String sessionId)
Deletes all the session information being maintained for the specified sessionId. If the sessionId is not found, the method gracefully returns.

Parameters:
sessionId - to delete information for (should never be null)


Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.