SessionManager

A SessionManager manages the creation, maintenance, and clean-up of all application {@link hunt.shiro.session.Session Session}s.

Members

Functions

getSession
Session getSession(SessionKey key)

Retrieves the session corresponding to the specified contextual data (such as a session ID if applicable), or {@code null} if no Session could be found. If a session is found but invalid (stopped or expired), a {@link SessionException} will be thrown.

start
Session 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. <p/> This method is mainly used in framework development, as the implementation will often relay the argument to an underlying {@link SessionFactory} which could use the context to construct the internal Session instance in a specific manner. This allows pluggable {@link hunt.shiro.session.Session Session} creation logic by simply injecting a {@code SessionFactory} into the {@code SessionManager} instance.

Meta