JSecurity

org.jsecurity.session.mgt
Class DefaultSessionManager

java.lang.Object
  extended by org.jsecurity.session.mgt.AbstractSessionManager
      extended by org.jsecurity.session.mgt.AbstractValidatingSessionManager
          extended by org.jsecurity.session.mgt.DefaultSessionManager
All Implemented Interfaces:
CacheManagerAware, SessionManager, ValidatingSessionManager, SessionListenerRegistrar, Destroyable
Direct Known Subclasses:
DefaultWebSessionManager

public class DefaultSessionManager
extends AbstractValidatingSessionManager
implements CacheManagerAware

Default business-tier implementation of the ValidatingSessionManager interface.

Since:
0.1
Author:
Les Hazlewood

Field Summary
protected  SessionDAO sessionDAO
           
 
Fields inherited from class org.jsecurity.session.mgt.AbstractValidatingSessionManager
DEFAULT_GLOBAL_SESSION_TIMEOUT, DEFAULT_SESSION_VALIDATION_INTERVAL, globalSessionTimeout, MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, sessionValidationInterval, sessionValidationScheduler, sessionValidationSchedulerEnabled
 
Fields inherited from class org.jsecurity.session.mgt.AbstractSessionManager
listeners
 
Constructor Summary
DefaultSessionManager()
           
 
Method Summary
protected  void create(Session session)
           
protected  Session doCreateSession(InetAddress originatingHost)
           
protected  Collection<Session> getActiveSessions()
           
 SessionDAO getSessionDAO()
           
protected  Session newSessionInstance(InetAddress inetAddress)
           
protected  void onChange(Session session)
           
protected  void onExpiration(Session session)
           
protected  void onStop(Session session)
           
protected  Session retrieveSession(Serializable sessionId)
           
 void setCacheManager(CacheManager cacheManager)
          Sets the available CacheManager instance on this component.
 void setSessionDAO(SessionDAO sessionDAO)
           
 
Methods inherited from class org.jsecurity.session.mgt.AbstractValidatingSessionManager
afterSessionValidationEnabled, beforeSessionValidationDisabled, createSession, createSessionValidationScheduler, destroy, disableSessionValidation, doGetSession, enableSessionValidation, enableSessionValidationIfNecessary, getGlobalSessionTimeout, getSessionValidationInterval, getSessionValidationScheduler, getTimeout, isSessionValidationSchedulerEnabled, setGlobalSessionTimeout, setSessionValidationInterval, setSessionValidationScheduler, setSessionValidationSchedulerEnabled, validate, validateSession, validateSessions
 
Methods inherited from class org.jsecurity.session.mgt.AbstractSessionManager
add, beforeInvalidNotification, getAttribute, getAttributeKeys, getHostAddress, getLastAccessTime, getSession, getStartTimestamp, getTimeout, isValid, notifyExpiration, notifyStart, notifyStop, remove, removeAttribute, setAttribute, setSessionListeners, setTimeout, start, stop, stop, touch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsecurity.session.mgt.SessionManager
getAttribute, getAttributeKeys, getHostAddress, getLastAccessTime, getStartTimestamp, getTimeout, isValid, removeAttribute, setAttribute, setTimeout, start, stop, touch
 

Field Detail

sessionDAO

protected SessionDAO sessionDAO
Constructor Detail

DefaultSessionManager

public DefaultSessionManager()
Method Detail

setSessionDAO

public void setSessionDAO(SessionDAO sessionDAO)

getSessionDAO

public SessionDAO getSessionDAO()

setCacheManager

public void setCacheManager(CacheManager cacheManager)
Description copied from interface: CacheManagerAware
Sets the available CacheManager instance on this component.

Specified by:
setCacheManager in interface CacheManagerAware
Parameters:
cacheManager - the CacheManager instance to set on this component.

doCreateSession

protected Session doCreateSession(InetAddress originatingHost)
Specified by:
doCreateSession in class AbstractValidatingSessionManager

newSessionInstance

protected Session newSessionInstance(InetAddress inetAddress)

create

protected void create(Session session)

onStop

protected void onStop(Session session)
Overrides:
onStop in class AbstractSessionManager

onExpiration

protected void onExpiration(Session session)
Overrides:
onExpiration in class AbstractSessionManager

onChange

protected void onChange(Session session)
Overrides:
onChange in class AbstractSessionManager

retrieveSession

protected Session retrieveSession(Serializable sessionId)
                           throws InvalidSessionException
Specified by:
retrieveSession in class AbstractValidatingSessionManager
Throws:
InvalidSessionException

getActiveSessions

protected Collection<Session> getActiveSessions()
Specified by:
getActiveSessions in class AbstractValidatingSessionManager

JSecurity

Copyright © 2004-2008 JSecurity.