SessionsSecurityManager
SessionsSecurityManager的具體行爲就是實現SessionManager的抽象行爲session
SessionManager
public interface SessionManager { // 建立Session Session start(SessionContext context); // 根據SessionKey得到Session Session getSession(SessionKey key) throws SessionException; }
SessionsSecurityManager內置了一個SessionManager會員管理器this
public Session start(SessionContext context) throws AuthorizationException { return this.sessionManager.start(context); } public Session getSession(SessionKey key) throws SessionException { return this.sessionManager.getSession(key); }
其設計理念是實現會員管理器接口,又用會員管理器去具體實現其定義的行爲。spa