org.tinygroup.weblayer.webcontext.session.impl
public class SessionWebContextImpl extends AbstractWebContextWrapper implements SessionWebContext
HttpRequestContext实现。| Constructor and 描述 |
|---|
SessionWebContextImpl(WebContext wrappedContext,
SessionConfig sessionConfig)
构造函数。
|
| Modifier and Type | Method and 描述 |
|---|---|
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是否已经作废。
|
exist, existFromWrapperContext, get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, isRequestFinished, putSubWebContext, setObject, setRequest, setResponse, setServletContextclearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, get, getParent, getSubContext, getSubContextMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParentget, getItemMap, put, putAll, remove, setItemMap, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, isRequestFinished, setObject, setRequest, setResponse, setServletContextpublic SessionWebContextImpl(WebContext wrappedContext, SessionConfig sessionConfig)
public SessionConfig getSessionConfig()
SessionConfig实例。getSessionConfig 接口 {1} 中的 {0} SessionWebContextSessionConfig实例public boolean isSessionInvalidated()
isSessionInvalidated 接口 {1} 中的 {0} SessionWebContexttruepublic void clear()
invalidate()方法,但支持后续操作,而不会抛出
IllegalStateException。clear 接口 {1} 中的 {0} org.tinygroup.context.BaseContextclear 接口 {1} 中的 {0} SessionWebContextclear 类 {1} 中的 {0} org.tinygroup.context.impl.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 接口 {1} 中的 {0} TwoPhaseCommitWebContextWebContextExceptionpublic void commit()
Copyright © 2006–2015 TinyGroup. All rights reserved.