edu.internet2.middleware.shibboleth.common.session
Interface SessionManager<SessionType extends Session>

Type Parameters:
SessionType - type of session object managed

public interface SessionManager<SessionType extends Session>

Session managers are responsible for creating, managing, and destroying Shibboleth sessions. Session managers produce a LoginEvent during session creation and a LogoutEvent during session destruction. These events are published in the root application context, that is the highest ancestor, of the application context presented to a session manager.


Method Summary
 SessionType createSession()
          Creates an empty Shibboleth session.
 SessionType createSession(String principal)
          Deprecated. use createSession()
 void destroySession(String index)
          Destroys the session.
 SessionType getSession(String index)
          Gets the user's session based on a session index.
 boolean indexSession(SessionType session, String index)
          Indexes a session by the given string.
 void removeSessionIndex(String index)
          Removes the given index from its associated session.
 

Method Detail

createSession

SessionType createSession()
Creates an empty Shibboleth session. The created session only contains an session ID. No other properties are populated.

Returns:
a Shibboleth session
Since:
1.1

createSession

SessionType createSession(String principal)
Deprecated. use createSession()

Creates a Shibboleth session.

Parameters:
principal - the principal name of the user
Returns:
a Shibboleth session

destroySession

void destroySession(String index)
Destroys the session.

Parameters:
index - the index of the session.

getSession

SessionType getSession(String index)
Gets the user's session based on a session index.

Parameters:
index - the index of the session
Returns:
the session

indexSession

boolean indexSession(SessionType session,
                     String index)
Indexes a session by the given string. This index is in addition too the session's ID.

Parameters:
session - session to index
index - additional index
Returns:
true if the given session is assigned the given index, false if not. This operation may fail if the given index is already assigned to another session or if the given session is not managed by this session manager.
Since:
1.1

removeSessionIndex

void removeSessionIndex(String index)
Removes the given index from its associated session.

Parameters:
index - index to be removed.
Since:
1.1


Copyright © 2006-2008 Internet2. All Rights Reserved.