edu.internet2.middleware.shibboleth.idp.session.impl
Class SessionManagerImpl

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.idp.session.impl.SessionManagerImpl
All Implemented Interfaces:
SessionManager<Session>

public class SessionManagerImpl
extends Object
implements SessionManager<Session>

Manager of IdP sessions.


Field Summary
private  org.slf4j.Logger log
          Class logger.
private  String partition
          Partition in which entries are stored.
private  SecureRandom prng
          A SecureRandom PRNG to generate session IDs.
private  int sessionIDSize
          Number of random bits within a session ID.
private  long sessionLifetime
          Lifetime, in milliseconds, of session.
private  StorageService<String,SessionManagerEntry> sessionStore
          Backing service used to store sessions.
 
Constructor Summary
SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService, long lifetime)
          Constructor.
SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService, String storageParition, long lifetime)
          Constructor.
 
Method Summary
 Session createSession()
          
 Session createSession(String principal)
          
 void destroySession(String sessionID)
          
 Session getSession(String sessionID)
          
 boolean indexSession(Session session, String index)
          
 void removeSessionIndex(String index)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.slf4j.Logger log
Class logger.


sessionIDSize

private final int sessionIDSize
Number of random bits within a session ID.

See Also:
Constant Field Values

prng

private final SecureRandom prng
A SecureRandom PRNG to generate session IDs.


sessionStore

private StorageService<String,SessionManagerEntry> sessionStore
Backing service used to store sessions.


partition

private String partition
Partition in which entries are stored.


sessionLifetime

private long sessionLifetime
Lifetime, in milliseconds, of session.

Constructor Detail

SessionManagerImpl

public SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService,
                          long lifetime)
Constructor.

Parameters:
storageService - service used to store sessions
lifetime - lifetime, in milliseconds, of sessions

SessionManagerImpl

public SessionManagerImpl(StorageService<String,SessionManagerEntry> storageService,
                          String storageParition,
                          long lifetime)
Constructor.

Parameters:
storageService - service used to store session
storageParition - partition in which sessions are stored
lifetime - lifetime, in milliseconds, of sessions
Method Detail

createSession

public Session createSession()

Specified by:
createSession in interface SessionManager<Session>

createSession

public Session createSession(String principal)

Specified by:
createSession in interface SessionManager<Session>

destroySession

public void destroySession(String sessionID)

Specified by:
destroySession in interface SessionManager<Session>

getSession

public Session getSession(String sessionID)

Specified by:
getSession in interface SessionManager<Session>

indexSession

public boolean indexSession(Session session,
                            String index)

Specified by:
indexSession in interface SessionManager<Session>

removeSessionIndex

public void removeSessionIndex(String index)

Specified by:
removeSessionIndex in interface SessionManager<Session>


Copyright © 1999-2012. All Rights Reserved.