Search in sources :

Example 6 with SessionManager

use of cn.taketoday.web.session.SessionManager in project today-framework by TAKETODAY.

the class SessionLocaleResolver method setSessionAttribute.

private void setSessionAttribute(RequestContext request, String attributeName, @Nullable Object attribute) {
    SessionManager sessionManager = getSessionManager(request);
    if (sessionManager != null) {
        WebSession session = sessionManager.getSession(request);
        session.setAttribute(attributeName, attribute);
    }
}
Also used : WebSession(cn.taketoday.web.session.WebSession) SessionManager(cn.taketoday.web.session.SessionManager)

Aggregations

SessionManager (cn.taketoday.web.session.SessionManager)6 WebSession (cn.taketoday.web.session.WebSession)4 DefaultSessionManager (cn.taketoday.web.session.DefaultSessionManager)2 SecureRandomSessionIdGenerator (cn.taketoday.web.session.SecureRandomSessionIdGenerator)2 SessionEventDispatcher (cn.taketoday.web.session.SessionEventDispatcher)2 LinkedHashMap (java.util.LinkedHashMap)2 InMemorySessionRepository (cn.taketoday.web.session.InMemorySessionRepository)1 MemSessionRepository (cn.taketoday.web.session.MemSessionRepository)1