@Test public void shiroSessionModeInit() { sm.setSessionMode(DefaultWebSecurityManager.NATIVE_SESSION_MODE); }
@Deprecated public void setSessionMode(String sessionMode) { log.warn("The 'sessionMode' property has been deprecated. Please configure an appropriate WebSessionManager " + "instance instead of using this property. This property/method will be removed in a later version."); String mode = sessionMode; if (mode == null) { throw new IllegalArgumentException("sessionMode argument cannot be null."); } mode = sessionMode.toLowerCase(); if (!HTTP_SESSION_MODE.equals(mode) && !NATIVE_SESSION_MODE.equals(mode)) { String msg = "Invalid sessionMode [" + sessionMode + "]. Allowed values are " + "public static final String constants in the " + getClass().getName() + " class: '" + HTTP_SESSION_MODE + "' or '" + NATIVE_SESSION_MODE + "', with '" + HTTP_SESSION_MODE + "' being the default."; throw new IllegalArgumentException(msg); } boolean recreate = this.sessionMode == null || !this.sessionMode.equals(mode); this.sessionMode = mode; if (recreate) { LifecycleUtils.destroy(getSessionManager()); SessionManager sessionManager = createSessionManager(mode); this.setInternalSessionManager(sessionManager); } }
DefaultWebSecurityManager extends DefaultSecurityManager implements WebSecurityManager { @Deprecated public void setSessionMode(String sessionMode) { log.warn("The 'sessionMode' property has been deprecated. Please configure an appropriate WebSessionManager " + "instance instead of using this property. This property/method will be removed in a later version."); String mode = sessionMode; if (mode == null) { throw new IllegalArgumentException("sessionMode argument cannot be null."); } mode = sessionMode.toLowerCase(); if (!HTTP_SESSION_MODE.equals(mode) && !NATIVE_SESSION_MODE.equals(mode)) { String msg = "Invalid sessionMode [" + sessionMode + "]. Allowed values are " + "public static final String constants in the " + getClass().getName() + " class: '" + HTTP_SESSION_MODE + "' or '" + NATIVE_SESSION_MODE + "', with '" + HTTP_SESSION_MODE + "' being the default."; throw new IllegalArgumentException(msg); } boolean recreate = this.sessionMode == null || !this.sessionMode.equals(mode); this.sessionMode = mode; if (recreate) { LifecycleUtils.destroy(getSessionManager()); SessionManager sessionManager = createSessionManager(mode); this.setInternalSessionManager(sessionManager); } } }
DefaultWebSecurityManager extends DefaultSecurityManager implements WebSecurityManager { @Deprecated public void setSessionMode(String sessionMode) { log.warn("The 'sessionMode' property has been deprecated. Please configure an appropriate WebSessionManager " + "instance instead of using this property. This property/method will be removed in a later version."); String mode = sessionMode; if (mode == null) { throw new IllegalArgumentException("sessionMode argument cannot be null."); } mode = sessionMode.toLowerCase(); if (!HTTP_SESSION_MODE.equals(mode) && !NATIVE_SESSION_MODE.equals(mode)) { String msg = "Invalid sessionMode [" + sessionMode + "]. Allowed values are " + "public static final String constants in the " + getClass().getName() + " class: '" + HTTP_SESSION_MODE + "' or '" + NATIVE_SESSION_MODE + "', with '" + HTTP_SESSION_MODE + "' being the default."; throw new IllegalArgumentException(msg); } boolean recreate = this.sessionMode == null || !this.sessionMode.equals(mode); this.sessionMode = mode; if (recreate) { LifecycleUtils.destroy(getSessionManager()); SessionManager sessionManager = createSessionManager(mode); this.setInternalSessionManager(sessionManager); } } DefaultWebSecurityManager(); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Realm singleRealm); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Collection<Realm> realms); }
DefaultWebSecurityManager extends DefaultSecurityManager implements WebSecurityManager { @Deprecated public void setSessionMode(String sessionMode) { log.warn("The 'sessionMode' property has been deprecated. Please configure an appropriate WebSessionManager " + "instance instead of using this property. This property/method will be removed in a later version."); String mode = sessionMode; if (mode == null) { throw new IllegalArgumentException("sessionMode argument cannot be null."); } mode = sessionMode.toLowerCase(); if (!HTTP_SESSION_MODE.equals(mode) && !NATIVE_SESSION_MODE.equals(mode)) { String msg = "Invalid sessionMode [" + sessionMode + "]. Allowed values are " + "public static final String constants in the " + getClass().getName() + " class: '" + HTTP_SESSION_MODE + "' or '" + NATIVE_SESSION_MODE + "', with '" + HTTP_SESSION_MODE + "' being the default."; throw new IllegalArgumentException(msg); } boolean recreate = this.sessionMode == null || !this.sessionMode.equals(mode); this.sessionMode = mode; if (recreate) { LifecycleUtils.destroy(getSessionManager()); SessionManager sessionManager = createSessionManager(mode); this.setInternalSessionManager(sessionManager); } } DefaultWebSecurityManager(); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Realm singleRealm); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Collection<Realm> realms); @Override //since 1.2.1 for fixing SHIRO-350 void setSubjectDAO(SubjectDAO subjectDAO); @SuppressWarnings({"UnusedDeclaration"}) @Deprecated String getSessionMode(); @Deprecated void setSessionMode(String sessionMode); @Override void setSessionManager(SessionManager sessionManager); boolean isHttpSessionMode(); }
DefaultWebSecurityManager extends DefaultSecurityManager implements WebSecurityManager { @Deprecated public void setSessionMode(String sessionMode) { log.warn("The 'sessionMode' property has been deprecated. Please configure an appropriate WebSessionManager " + "instance instead of using this property. This property/method will be removed in a later version."); String mode = sessionMode; if (mode == null) { throw new IllegalArgumentException("sessionMode argument cannot be null."); } mode = sessionMode.toLowerCase(); if (!HTTP_SESSION_MODE.equals(mode) && !NATIVE_SESSION_MODE.equals(mode)) { String msg = "Invalid sessionMode [" + sessionMode + "]. Allowed values are " + "public static final String constants in the " + getClass().getName() + " class: '" + HTTP_SESSION_MODE + "' or '" + NATIVE_SESSION_MODE + "', with '" + HTTP_SESSION_MODE + "' being the default."; throw new IllegalArgumentException(msg); } boolean recreate = this.sessionMode == null || !this.sessionMode.equals(mode); this.sessionMode = mode; if (recreate) { LifecycleUtils.destroy(getSessionManager()); SessionManager sessionManager = createSessionManager(mode); this.setInternalSessionManager(sessionManager); } } DefaultWebSecurityManager(); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Realm singleRealm); @SuppressWarnings({"UnusedDeclaration"})  DefaultWebSecurityManager(Collection<Realm> realms); @Override //since 1.2.1 for fixing SHIRO-350 void setSubjectDAO(SubjectDAO subjectDAO); @SuppressWarnings({"UnusedDeclaration"}) @Deprecated String getSessionMode(); @Deprecated void setSessionMode(String sessionMode); @Override void setSessionManager(SessionManager sessionManager); boolean isHttpSessionMode(); @Deprecated
    static final String HTTP_SESSION_MODE; @Deprecated
    static final String NATIVE_SESSION_MODE; }