public class LazyCommitWebContextImpl extends AbstractWebContextWrapper implements LazyCommitWebContext
REQUEST_ATTRIBUTE_FROM_WEBCONTEXT| Constructor and Description |
|---|
LazyCommitWebContextImpl(WebContext wrappedContext)
包装一个
RequestContext对象。 |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
结束一个请求。
|
void |
commitHeaders()
提交headers
|
String |
getErrorMessage()
如果
sendError()方法曾被调用,则该方法返回一个error信息。 |
int |
getErrorStatus()
如果
sendError()方法曾被调用,则该方法返回一个error状态值。 |
String |
getRedirectLocation()
取得重定向的URI。
|
int |
getStatus()
取得最近设置的HTTP status。
|
boolean |
isError()
判断当前请求是否已出现异常。
|
boolean |
isRedirected()
判断当前请求是否已被重定向。
|
boolean |
isRequestFinished()
请求是否已终止,例如请求已被重定向了,该请求将被终止,返回true。还有访问的页面已被缓存,可以直接从缓存中获取页面信息,也将返回true,
默认实现是返回false。
|
exist, existFromWrapperContext, get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, putSubWebContext, setObject, setRequest, setResponse, setServletContextclear, clearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalContext, getTotalItemMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParentget, put, putAll, remove, setItemMap, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContextclearSubContext, createSubContext, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalItemMap, put, putSubContext, remove, removeSubContext, setParentpublic LazyCommitWebContextImpl(WebContext wrappedContext)
RequestContext对象。wrappedContext - 被包装的RequestContextpublic boolean isError()
isError in interface LazyCommitWebContexttruepublic int getErrorStatus()
sendError()方法曾被调用,则该方法返回一个error状态值。getErrorStatus in interface LazyCommitWebContext0public String getErrorMessage()
sendError()方法曾被调用,则该方法返回一个error信息。getErrorMessage in interface LazyCommitWebContextnullpublic boolean isRedirected()
isRedirected in interface LazyCommitWebContexttruepublic String getRedirectLocation()
getRedirectLocation in interface LazyCommitWebContextnullpublic int getStatus()
getStatus in interface LazyCommitWebContextpublic void commitHeaders()
throws LazyCommitFailedException
TwoPhaseCommitWebContextcommitHeaders in interface TwoPhaseCommitWebContextLazyCommitFailedExceptionpublic void commit()
throws LazyCommitFailedException
LazyCommitFailedException - 如果失败public boolean isRequestFinished()
WebContextisRequestFinished in interface WebContextisRequestFinished in class AbstractWebContextWrapperCopyright © 2006–2018 TinyGroup. All rights reserved.