Class DefaultWebSessionManager
java.lang.Object
org.apache.shiro.session.mgt.AbstractSessionManager
org.apache.shiro.session.mgt.AbstractNativeSessionManager
org.apache.shiro.session.mgt.AbstractValidatingSessionManager
org.apache.shiro.session.mgt.DefaultSessionManager
org.apache.shiro.web.session.mgt.DefaultWebSessionManager
- All Implemented Interfaces:
org.apache.shiro.cache.CacheManagerAware,org.apache.shiro.event.EventBusAware,org.apache.shiro.lang.util.Destroyable,org.apache.shiro.session.mgt.NativeSessionManager,org.apache.shiro.session.mgt.SessionManager,org.apache.shiro.session.mgt.ValidatingSessionManager,WebSessionManager
public class DefaultWebSessionManager
extends org.apache.shiro.session.mgt.DefaultSessionManager
implements WebSessionManager
Web-application capable
SessionManager implementation.- Since:
- 0.9
-
Field Summary
Fields inherited from class org.apache.shiro.session.mgt.DefaultSessionManager
sessionDAOFields inherited from class org.apache.shiro.session.mgt.AbstractValidatingSessionManager
DEFAULT_SESSION_VALIDATION_INTERVAL, sessionValidationInterval, sessionValidationScheduler, sessionValidationSchedulerEnabledFields inherited from class org.apache.shiro.session.mgt.AbstractSessionManager
DEFAULT_GLOBAL_SESSION_TIMEOUT, MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.shiro.session.SessioncreateExposedSession(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionContext context) protected org.apache.shiro.session.SessioncreateExposedSession(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionKey key) protected SerializablegetSessionId(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) getSessionId(org.apache.shiro.session.mgt.SessionKey key) booleanThis is a native session manager implementation, so this method returnsfalsealways.booleanbooleanprotected voidonExpiration(org.apache.shiro.session.Session s, org.apache.shiro.session.ExpiredSessionException ese, org.apache.shiro.session.mgt.SessionKey key) protected voidonInvalidation(org.apache.shiro.session.Session session, org.apache.shiro.session.InvalidSessionException ise, org.apache.shiro.session.mgt.SessionKey key) protected voidonStart(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionContext context) Stores the Session's ID, usually as a Cookie, to associate with future requests.protected voidonStop(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionKey key) voidsetSessionIdCookie(Cookie sessionIdCookie) voidsetSessionIdCookieEnabled(boolean sessionIdCookieEnabled) voidsetSessionIdUrlRewritingEnabled(boolean sessionIdUrlRewritingEnabled) Methods inherited from class org.apache.shiro.session.mgt.DefaultSessionManager
afterExpired, afterStopped, create, delete, doCreateSession, getActiveSessions, getSessionDAO, getSessionFactory, isDeleteInvalidSessions, newSessionInstance, onChange, onExpiration, onStop, retrieveSession, retrieveSessionFromDataSource, setCacheManager, setDeleteInvalidSessions, setSessionDAO, setSessionFactoryMethods inherited from class org.apache.shiro.session.mgt.AbstractValidatingSessionManager
afterSessionValidationEnabled, beforeSessionValidationDisabled, createSession, createSessionValidationScheduler, destroy, disableSessionValidation, doGetSession, doValidate, enableSessionValidation, getSessionValidationInterval, getSessionValidationScheduler, getTimeout, isSessionValidationSchedulerEnabled, setSessionValidationInterval, setSessionValidationScheduler, setSessionValidationSchedulerEnabled, validate, validateSessionsMethods inherited from class org.apache.shiro.session.mgt.AbstractNativeSessionManager
applyGlobalSessionTimeout, beforeInvalidNotification, checkValid, getAttribute, getAttributeKeys, getEventBus, getHost, getLastAccessTime, getSession, getSessionListeners, getStartTimestamp, getTimeout, isValid, notifyExpiration, notifyStart, notifyStop, publishEvent, removeAttribute, setAttribute, setEventBus, setSessionListeners, setTimeout, start, stop, touchMethods inherited from class org.apache.shiro.session.mgt.AbstractSessionManager
getGlobalSessionTimeout, setGlobalSessionTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.shiro.session.mgt.SessionManager
getSession, start
-
Constructor Details
-
DefaultWebSessionManager
public DefaultWebSessionManager()
-
-
Method Details
-
getSessionIdCookie
-
setSessionIdCookie
-
isSessionIdCookieEnabled
-
setSessionIdCookieEnabled
-
isSessionIdUrlRewritingEnabled
-
setSessionIdUrlRewritingEnabled
-
createExposedSession
protected org.apache.shiro.session.Session createExposedSession(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionContext context) - Overrides:
createExposedSessionin classorg.apache.shiro.session.mgt.AbstractNativeSessionManager
-
createExposedSession
protected org.apache.shiro.session.Session createExposedSession(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionKey key) - Overrides:
createExposedSessionin classorg.apache.shiro.session.mgt.AbstractNativeSessionManager
-
onStart
protected void onStart(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionContext context) Stores the Session's ID, usually as a Cookie, to associate with future requests.- Overrides:
onStartin classorg.apache.shiro.session.mgt.AbstractNativeSessionManager- Parameters:
session- the session that was justcreated.
-
getSessionId
- Overrides:
getSessionIdin classorg.apache.shiro.session.mgt.DefaultSessionManager
-
getSessionId
protected Serializable getSessionId(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) -
onExpiration
protected void onExpiration(org.apache.shiro.session.Session s, org.apache.shiro.session.ExpiredSessionException ese, org.apache.shiro.session.mgt.SessionKey key) - Overrides:
onExpirationin classorg.apache.shiro.session.mgt.AbstractValidatingSessionManager
-
onInvalidation
protected void onInvalidation(org.apache.shiro.session.Session session, org.apache.shiro.session.InvalidSessionException ise, org.apache.shiro.session.mgt.SessionKey key) - Overrides:
onInvalidationin classorg.apache.shiro.session.mgt.AbstractValidatingSessionManager
-
onStop
protected void onStop(org.apache.shiro.session.Session session, org.apache.shiro.session.mgt.SessionKey key) - Overrides:
onStopin classorg.apache.shiro.session.mgt.AbstractNativeSessionManager
-
isServletContainerSessions
This is a native session manager implementation, so this method returnsfalsealways.- Specified by:
isServletContainerSessionsin interfaceWebSessionManager- Returns:
falsealways- Since:
- 1.2
-