public class SessionWebContextImpl extends AbstractWebContextWrapper implements SessionWebContext
HttpRequestContext实现。itemMap| 构造器和说明 |
|---|
SessionWebContextImpl(WebContext wrappedContext,
SessionConfig sessionConfig)
构造函数。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
清除session。
|
void |
clearSessionIDFromCookie()
将session ID从Cookie中删除。
|
void |
commit()
结束一个请求。
|
void |
commitHeaders()
提交headers
|
String |
decodeSessionIDFromCookie()
从cookie中取得session ID。
|
String |
decodeSessionIDFromURL()
从URL中取得session ID。
|
void |
encodeSessionIDIntoCookie()
将session ID编码到Cookie中去。
|
String |
encodeSessionIDIntoURL(String url)
将session ID编码到URL中去。
|
String |
getRequestedSessionID()
取得当前的session ID。
|
javax.servlet.http.HttpSession |
getSession(boolean create)
取得当前的session,如果不存在,且
create为true,则创建一个新的。 |
SessionConfig |
getSessionConfig()
取得
SessionConfig实例。 |
boolean |
isRequestedSessionIDFromCookie()
当前的session ID是从cookie中取得的吗?
|
boolean |
isRequestedSessionIDFromURL()
当前的session ID是从URL中取得的吗?
|
boolean |
isRequestedSessionIDValid()
判断当前的session ID是否仍然合法。
|
boolean |
isSessionInvalidated()
判断session是否已经作废。
|
get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, putSubWebContext, setObject, setRequest, setResponse, setServletContextclearSubContext, createSubContext, findNodeMap, get, getParent, getSubContext, getSubContextMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParentexist, get, getItemMap, put, remove, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContextclearSubContext, createSubContext, get, getParent, getSubContext, getSubContextMap, put, putSubContext, remove, removeSubContext, setParentexist, get, get, getItemMap, put, remove, renameKey, sizepublic SessionWebContextImpl(WebContext wrappedContext, SessionConfig sessionConfig)
public SessionConfig getSessionConfig()
SessionConfig实例。getSessionConfig 在接口中 SessionWebContextSessionConfig实例public boolean isSessionInvalidated()
isSessionInvalidated 在接口中 SessionWebContexttruepublic void clear()
invalidate()方法,但支持后续操作,而不会抛出
IllegalStateException。clear 在接口中 BaseContextclear 在接口中 SessionWebContextclear 在类中 ContextImplpublic String getRequestedSessionID()
public boolean isRequestedSessionIDFromCookie()
truepublic boolean isRequestedSessionIDFromURL()
truepublic boolean isRequestedSessionIDValid()
truepublic void encodeSessionIDIntoCookie()
public void clearSessionIDFromCookie()
public String decodeSessionIDFromCookie()
nullpublic String encodeSessionIDIntoURL(String url)
public String decodeSessionIDFromURL()
nullpublic javax.servlet.http.HttpSession getSession(boolean create)
create为true,则创建一个新的。create - 必要时是否创建新的sessioncreate为
false ,则返回nullpublic void commitHeaders()
throws WebContextException
TwoPhaseCommitWebContextcommitHeaders 在接口中 TwoPhaseCommitWebContextWebContextExceptionpublic void commit()
Copyright © 2006-2013 开源组织. All Rights Reserved.