Uses of Interface
org.apache.shiro.session.Session
-
Packages that use Session Package Description org.apache.shiro.mgt Provides the masterSecurityManagerinterface and a default implementation hierarchy for managing all aspects of Shiro's functionality in an application.org.apache.shiro.session Components related to managing sessions, the time-based data contexts in which a Subject interacts with an application.org.apache.shiro.session.mgt SessionManagercomponents supporting enterprise session management.org.apache.shiro.session.mgt.eis EIS (Enterprise Information System)-tier components that can perform CRUD operations for sessions using any EIS API.org.apache.shiro.subject Components supporting theSubjectinterface, the most important concept in Shiro's API.org.apache.shiro.subject.support Concrete support implementations of most of theorg.apache.shiro.subjectinterfaces. -
-
Uses of Session in org.apache.shiro.mgt
Methods in org.apache.shiro.mgt that return Session Modifier and Type Method Description SessionSessionsSecurityManager. getSession(SessionKey key)protected SessionDefaultSecurityManager. resolveContextSession(SubjectContext context)SessionSessionsSecurityManager. start(SessionContext context)Methods in org.apache.shiro.mgt with parameters of type Session Modifier and Type Method Description protected SubjectDefaultSubjectFactory. newSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)Deprecated.since 1.2 - overrideDefaultSubjectFactory.createSubject(org.apache.shiro.subject.SubjectContext)directly if you need to instantiate a customSubjectclass. -
Uses of Session in org.apache.shiro.session
Classes in org.apache.shiro.session that implement Session Modifier and Type Class Description classProxiedSessionSimpleSessionimplementation that immediately delegates all corresponding calls to an underlying proxied session instance.Fields in org.apache.shiro.session declared as Session Modifier and Type Field Description protected SessionProxiedSession. delegateThe proxied instanceMethods in org.apache.shiro.session with parameters of type Session Modifier and Type Method Description voidSessionListener. onExpiration(Session session)Notification callback that occurs when the corresponding Session has expired.voidSessionListenerAdapter. onExpiration(Session session)Adapter no-op implementation - does nothing and returns immediately.voidSessionListener. onStart(Session session)Notification callback that occurs when the corresponding Session has started.voidSessionListenerAdapter. onStart(Session session)Adapter no-op implementation - does nothing and returns immediately.voidSessionListener. onStop(Session session)Notification callback that occurs when the corresponding Session has stopped, either programmatically viastop()or automatically upon a subject logging out.voidSessionListenerAdapter. onStop(Session session)Adapter no-op implementation - does nothing and returns immediately.Constructors in org.apache.shiro.session with parameters of type Session Constructor Description ProxiedSession(Session target)Constructs an instance that proxies the specifiedtarget. -
Uses of Session in org.apache.shiro.session.mgt
Subinterfaces of Session in org.apache.shiro.session.mgt Modifier and Type Interface Description interfaceValidatingSessionAValidatingSessionis aSessionthat is capable of determining it is valid or not and is able to validate itself if necessary.Classes in org.apache.shiro.session.mgt that implement Session Modifier and Type Class Description classDelegatingSessionA DelegatingSession is a client-tier representation of a server sideSession.classImmutableProxiedSessionImplementation of theSessioninterface that proxies anotherSession, but does not allow any 'write' operations to the underlying session.classSimpleSessionSimpleSessionJavaBeans-compatible POJO implementation, intended to be used on the business/server tier.Methods in org.apache.shiro.session.mgt that return Session Modifier and Type Method Description protected SessionAbstractNativeSessionManager. beforeInvalidNotification(Session session)Returns the session instance to use to pass to registeredSessionListeners for notification that the session has been invalidated (stopped or expired).protected SessionAbstractNativeSessionManager. createExposedSession(Session session, SessionContext context)protected SessionAbstractNativeSessionManager. createExposedSession(Session session, SessionKey key)protected abstract SessionAbstractNativeSessionManager. createSession(SessionContext context)Creates a newSession Sessioninstance based on the specified (possiblynull) initialization data.protected SessionAbstractValidatingSessionManager. createSession(SessionContext context)SessionSessionFactory. createSession(SessionContext initData)Creates a newSessioninstance based on the specified contextual initialization data.SessionSimpleSessionFactory. createSession(SessionContext initData)Creates a newSimpleSessioninstance retaining the context'shostif one can be found.protected abstract SessionAbstractValidatingSessionManager. doCreateSession(SessionContext initData)protected SessionDefaultSessionManager. doCreateSession(SessionContext context)protected abstract SessionAbstractNativeSessionManager. doGetSession(SessionKey key)protected SessionAbstractValidatingSessionManager. doGetSession(SessionKey key)SessionAbstractNativeSessionManager. getSession(SessionKey key)SessionSessionManager. getSession(SessionKey key)Retrieves the session corresponding to the specified contextual data (such as a session ID if applicable), ornullif no Session could be found.protected SessionDefaultSessionManager. newSessionInstance(SessionContext context)protected abstract SessionAbstractValidatingSessionManager. retrieveSession(SessionKey key)Looks up a session from the underlying data store based on the specified session key.protected SessionDefaultSessionManager. retrieveSession(SessionKey sessionKey)protected SessionDefaultSessionManager. retrieveSessionFromDataSource(Serializable sessionId)SessionAbstractNativeSessionManager. start(SessionContext context)SessionSessionManager. start(SessionContext context)Starts a new session based on the specified contextual initialization data, which can be used by the underlying implementation to determine how exactly to create the internal Session instance.Methods in org.apache.shiro.session.mgt that return types with arguments of type Session Modifier and Type Method Description protected abstract Collection<Session>AbstractValidatingSessionManager. getActiveSessions()protected Collection<Session>DefaultSessionManager. getActiveSessions()Methods in org.apache.shiro.session.mgt with parameters of type Session Modifier and Type Method Description protected voidAbstractValidatingSessionManager. afterExpired(Session session)protected voidDefaultSessionManager. afterExpired(Session session)protected voidAbstractNativeSessionManager. afterStopped(Session session)protected voidDefaultSessionManager. afterStopped(Session session)protected voidAbstractNativeSessionManager. applyGlobalSessionTimeout(Session session)protected SessionAbstractNativeSessionManager. beforeInvalidNotification(Session session)Returns the session instance to use to pass to registeredSessionListeners for notification that the session has been invalidated (stopped or expired).protected voidDefaultSessionManager. create(Session session)Persists the given session instance to an underlying EIS (Enterprise Information System).protected SessionAbstractNativeSessionManager. createExposedSession(Session session, SessionContext context)protected SessionAbstractNativeSessionManager. createExposedSession(Session session, SessionKey key)protected voidDefaultSessionManager. delete(Session session)protected voidAbstractValidatingSessionManager. doValidate(Session session)protected longAbstractValidatingSessionManager. getTimeout(Session session)Subclass template hook in case per-session timeout is not based ongetTimeout().protected voidAbstractNativeSessionManager. notifyExpiration(Session session)protected voidAbstractNativeSessionManager. notifyStart(Session session)Notifies any interestedSessionListeners that a Session has started.protected voidAbstractNativeSessionManager. notifyStop(Session session)protected voidAbstractNativeSessionManager. onChange(Session s)protected voidDefaultSessionManager. onChange(Session session)protected voidAbstractValidatingSessionManager. onExpiration(Session session)protected voidAbstractValidatingSessionManager. onExpiration(Session s, ExpiredSessionException ese, SessionKey key)protected voidDefaultSessionManager. onExpiration(Session session)protected voidAbstractValidatingSessionManager. onInvalidation(Session s, InvalidSessionException ise, SessionKey key)protected voidAbstractNativeSessionManager. onStart(Session session, SessionContext context)Template method that allows subclasses to react to a new session being created.protected voidAbstractNativeSessionManager. onStop(Session session)protected voidAbstractNativeSessionManager. onStop(Session session, SessionKey key)protected voidDefaultSessionManager. onStop(Session session)protected voidAbstractValidatingSessionManager. validate(Session session, SessionKey key)Constructors in org.apache.shiro.session.mgt with parameters of type Session Constructor Description ImmutableProxiedSession(Session target)Constructs a new instance of this class proxying the specifiedSession. -
Uses of Session in org.apache.shiro.session.mgt.eis
Methods in org.apache.shiro.session.mgt.eis that return Session Modifier and Type Method Description protected abstract SessionAbstractSessionDAO. doReadSession(Serializable sessionId)Subclass implementation hook that retrieves the Session object from the underlying EIS ornullif a session with that ID could not be found.protected SessionEnterpriseCacheSessionDAO. doReadSession(Serializable sessionId)protected SessionMemorySessionDAO. doReadSession(Serializable sessionId)protected SessionCachingSessionDAO. getCachedSession(Serializable sessionId)Returns the cached session with the correspondingsessionIdornullif there is no session cached under that id (or if there is no Cache).protected SessionCachingSessionDAO. getCachedSession(Serializable sessionId, org.apache.shiro.cache.Cache<Serializable,Session> cache)Returns the Session with the specified id from the specified cache.SessionAbstractSessionDAO. readSession(Serializable sessionId)Retrieves the Session object from the underlying EIS identified by sessionId by delegating to theAbstractSessionDAO.doReadSession(java.io.Serializable)method.SessionCachingSessionDAO. readSession(Serializable sessionId)Attempts to acquire the Session from the cache first using the session ID as the cache key.SessionSessionDAO. readSession(Serializable sessionId)Retrieves the session from the EIS uniquely identified by the specifiedsessionId.protected SessionMemorySessionDAO. storeSession(Serializable id, Session session)Methods in org.apache.shiro.session.mgt.eis that return types with arguments of type Session Modifier and Type Method Description protected org.apache.shiro.cache.Cache<Serializable,Session>CachingSessionDAO. createActiveSessionsCache()Creates a cache instance used to store active sessions.Collection<Session>CachingSessionDAO. getActiveSessions()Returns all active sessions in the system.Collection<Session>MemorySessionDAO. getActiveSessions()Collection<Session>SessionDAO. getActiveSessions()Returns all sessions in the EIS that are considered active, meaning all sessions that haven't been stopped/expired.org.apache.shiro.cache.Cache<Serializable,Session>CachingSessionDAO. getActiveSessionsCache()Returns the cache instance to use for storing active sessions.Methods in org.apache.shiro.session.mgt.eis with parameters of type Session Modifier and Type Method Description protected voidAbstractSessionDAO. assignSessionId(Session session, Serializable sessionId)Utility method available to subclasses that wish to assign a generated session ID to the session instance directly.protected voidCachingSessionDAO. cache(Session session, Serializable sessionId)Caches the specified session under the cache entry key ofsessionId.protected voidCachingSessionDAO. cache(Session session, Serializable sessionId, org.apache.shiro.cache.Cache<Serializable,Session> cache)Caches the specified session in the given cache under the key ofsessionId.SerializableAbstractSessionDAO. create(Session session)Creates the session by delegating EIS creation to subclasses via theAbstractSessionDAO.doCreate(org.apache.shiro.session.Session)method, and then asserting that the returned sessionId is not null.SerializableCachingSessionDAO. create(Session session)Callssuper.create(session), then caches the session keyed by the returnedsessionId, and then returns thissessionId.SerializableSessionDAO. create(Session session)Inserts a new Session record into the underling EIS (e.g.voidCachingSessionDAO. delete(Session session)Removes the specified session from any cache and then permanently deletes the session from the EIS by delegating toCachingSessionDAO.doDelete(org.apache.shiro.session.Session).voidMemorySessionDAO. delete(Session session)voidSessionDAO. delete(Session session)Deletes the associated EIS record of the specifiedsession.protected abstract SerializableAbstractSessionDAO. doCreate(Session session)Subclass hook to actually persist the given Session instance to the underlying EIS.protected SerializableEnterpriseCacheSessionDAO. doCreate(Session session)protected SerializableMemorySessionDAO. doCreate(Session session)protected abstract voidCachingSessionDAO. doDelete(Session session)Subclass implementation hook to permanently delete the given Session from the underlying EIS.protected voidEnterpriseCacheSessionDAO. doDelete(Session session)protected abstract voidCachingSessionDAO. doUpdate(Session session)Subclass implementation hook to actually persist theSession's state to the underlying EIS.protected voidEnterpriseCacheSessionDAO. doUpdate(Session session)SerializableJavaUuidSessionIdGenerator. generateId(Session session)SerializableRandomSessionIdGenerator. generateId(Session session)Returns the String value of the configuredRandom'snextLong()invocation.SerializableSessionIdGenerator. generateId(Session session)Generates a new ID to be applied to the specifiedSessioninstance.protected SerializableAbstractSessionDAO. generateSessionId(Session session)Generates a new ID to be applied to the specifiedsessioninstance.protected SessionMemorySessionDAO. storeSession(Serializable id, Session session)protected voidCachingSessionDAO. uncache(Session session)Removes the specified Session from the cache.voidCachingSessionDAO. update(Session session)Updates the state of the given session to the EIS by first delegating toCachingSessionDAO.doUpdate(org.apache.shiro.session.Session).voidMemorySessionDAO. update(Session session)voidSessionDAO. update(Session session)Updates (persists) data from a previously created Session instance in the EIS identified by{@link Session#getId() session.getId()}.Method parameters in org.apache.shiro.session.mgt.eis with type arguments of type Session Modifier and Type Method Description protected voidCachingSessionDAO. cache(Session session, Serializable sessionId, org.apache.shiro.cache.Cache<Serializable,Session> cache)Caches the specified session in the given cache under the key ofsessionId.protected SessionCachingSessionDAO. getCachedSession(Serializable sessionId, org.apache.shiro.cache.Cache<Serializable,Session> cache)Returns the Session with the specified id from the specified cache.voidCachingSessionDAO. setActiveSessionsCache(org.apache.shiro.cache.Cache<Serializable,Session> cache)Sets the cache instance to use for storing active sessions. -
Uses of Session in org.apache.shiro.subject
Methods in org.apache.shiro.subject that return Session Modifier and Type Method Description SessionSubject. getSession()Returns the applicationSessionassociated with this Subject.SessionSubject. getSession(boolean create)Returns the applicationSessionassociated with this Subject.SessionSubjectContext. getSession()Returns theSessionto use when building theSubjectinstance.SessionSubjectContext. resolveSession()Methods in org.apache.shiro.subject with parameters of type Session Modifier and Type Method Description Subject.BuilderSubject.Builder. session(Session session)Ensures theSubjectbeing built will use the specifiedSessioninstance.voidSubjectContext. setSession(Session session)Sets theSessionto use when building theSubjectinstance. -
Uses of Session in org.apache.shiro.subject.support
Fields in org.apache.shiro.subject.support declared as Session Modifier and Type Field Description protected SessionDelegatingSubject. sessionMethods in org.apache.shiro.subject.support that return Session Modifier and Type Method Description protected SessionDelegatingSubject. decorate(Session session)SessionDefaultSubjectContext. getSession()SessionDelegatingSubject. getSession()SessionDelegatingSubject. getSession(boolean create)SessionDefaultSubjectContext. resolveSession()Methods in org.apache.shiro.subject.support with parameters of type Session Modifier and Type Method Description protected SessionDelegatingSubject. decorate(Session session)voidDefaultSubjectContext. setSession(Session session)Constructors in org.apache.shiro.subject.support with parameters of type Session Constructor Description DelegatingSubject(PrincipalCollection principals, boolean authenticated, String host, Session session, boolean sessionCreationEnabled, SecurityManager securityManager)DelegatingSubject(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)
-