最抽象功能也最基础的Session管理器,只包含了存取Session的过期时间
package org.apache.shiro.session.mgt; import org.apache.shiro.session.Session; public abstract class AbstractSessionManager implements SessionManager { protected static final long MILLIS_PER_SECOND = 1000; protected static final long MILLIS_PER_MINUTE = 60 * MILLIS_PER_SECOND; protected static final long MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE; /** * Default main session timeout value, equal to {@code 30} minutes. */ public static final long DEFAULT_GLOBAL_SESSION_TIMEOUT = 30 * MILLIS_PER_MINUTE; private long globalSessionTimeout = DEFAULT_GLOBAL_SESSION_TIMEOUT; public AbstractSessionManager() { } public long getGlobalSessionTimeout() { return this.globalSessionTimeout; } public void setGlobalSessionTimeout(long globalSessionTimeout) { this.globalSessionTimeout = globalSessionTimeout; } }