public abstract class SessionManager extends Object
| 构造器和说明 |
|---|
SessionManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract boolean |
accept(ActionContext actionContext)
是否接受当前环境,即会话管理器是否是当前环境的会话管理器。
|
static Callable<?> |
associateWith(Callable<?> callable)
包装一个Callable,当它运行时使用当前线程的最后一个SessionManager。
|
static Runnable |
associateWith(Runnable runnable)
包装一个Runnable,当它执行时使用当前线程的最后的一个SessionManager。
|
abstract Session |
delete(ActionContext actionContext)
删除当前会话。
|
abstract Session |
get(ActionContext actionContext)
获取一个指定的会话,其中name可以为null,如果Session不存在那么创建一个。。
|
static SessionManager |
getDefaultSessionManager()
返回默认的会话管理器。
|
static Session |
getSession(ActionContext actionContext)
获取默认环境的会话,是本地会话,公用一个Session。
|
static SessionManager |
getSessionManager(ActionContext actionContext)
根据环境返回会话管理器,如果不存在返回默认的会话管理器。
|
static List<SessionManager> |
getSessionManagers() |
static void |
popLocalSessionManager()
弹出当前线程的会话管理器。
|
static void |
pushLocalSessionManager(SessionManager sessionManager)
设置当前线程的会话管理器。
|
static void |
registSessionManager(SessionManager sessionManager) |
static Session |
remove(ActionContext actionContext) |
public static Session getSession(ActionContext actionContext)
actionContext - 上下文public static Session remove(ActionContext actionContext)
public static void registSessionManager(SessionManager sessionManager)
public static List<SessionManager> getSessionManagers()
public static SessionManager getSessionManager(ActionContext actionContext)
actionContext - 变量上下文public static void pushLocalSessionManager(SessionManager sessionManager)
sessionManager - 会话管理器public static Runnable associateWith(Runnable runnable)
runnable - Runnablepublic static Callable<?> associateWith(Callable<?> callable)
callable - Callablepublic static void popLocalSessionManager()
public static SessionManager getDefaultSessionManager()
public abstract Session get(ActionContext actionContext)
actionContext - 变量上下文public abstract Session delete(ActionContext actionContext)
actionContext - 变量上下文public abstract boolean accept(ActionContext actionContext)
actionContext - 变量上下文Copyright © 2022 xworker.org. All rights reserved.