接口 SessionManager
- 所有已知实现类:
DefaultSessionManager
public interface SessionManager
Main class for access to the
WebSession for an HTTP request.- 从以下版本开始:
- 2019-09-27 20:24
- 作者:
- TODAY
- 另请参阅:
-
字段概要
字段 -
方法概要
修饰符和类型方法说明create a new sessioncreateSession(RequestContext context) create a new session associated withRequestContextgetSession(RequestContext context) Returns the current session associated with this request, or if the request does not have a session, creates one.getSession(RequestContext context, boolean create) Returns the currentWebSessionassociated with this request or, if there is no current session andcreateis true, returns a new session.getSession(String sessionId) Get a session with given session id
-
字段详细资料
-
BEAN_NAME
default bean name- 另请参阅:
-
-
方法详细资料
-
createSession
WebSession createSession()create a new session -
createSession
create a new session associated withRequestContext -
getSession
Get a session with given session idIf there is not a session,create one.
-
getSession
Returns the current session associated with this request, or if the request does not have a session, creates one.- 参数:
context- Current request- 返回:
- the
WebSessionassociated with this request - 另请参阅:
-
getSession
Returns the currentWebSessionassociated with this request or, if there is no current session andcreateis true, returns a new session.If
createisfalseand the request has no validWebSession, this method returnsnull.To make sure the session is properly maintained, you must call this method before the response is committed. If the container is using cookies to maintain session integrity and is asked to create a new session when the response is committed, an IllegalStateException is thrown.
- 参数:
context- Current requestcreate-trueto create a new session for this request if necessary;falseto returnnullif there's no current session- 返回:
- the
WebSessionassociated with this request ornullifcreateisfalseand the request has no valid session - 另请参阅:
-