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, setServletContext
clear, clearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalContext, getTotalItemMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParent
get, put, putAll, remove, setItemMap, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContext
clearSubContext, createSubContext, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalItemMap, put, putSubContext, remove, removeSubContext, setParent
public LazyCommitWebContextImpl(WebContext wrappedContext)
RequestContext
对象。wrappedContext
- 被包装的RequestContext
public boolean isError()
isError
in interface LazyCommitWebContext
true
public int getErrorStatus()
sendError()
方法曾被调用,则该方法返回一个error状态值。getErrorStatus
in interface LazyCommitWebContext
0
public String getErrorMessage()
sendError()
方法曾被调用,则该方法返回一个error信息。getErrorMessage
in interface LazyCommitWebContext
null
public boolean isRedirected()
isRedirected
in interface LazyCommitWebContext
true
public String getRedirectLocation()
getRedirectLocation
in interface LazyCommitWebContext
null
public int getStatus()
getStatus
in interface LazyCommitWebContext
public void commitHeaders() throws LazyCommitFailedException
TwoPhaseCommitWebContext
commitHeaders
in interface TwoPhaseCommitWebContext
LazyCommitFailedException
public void commit() throws LazyCommitFailedException
LazyCommitFailedException
- 如果失败public boolean isRequestFinished()
WebContext
isRequestFinished
in interface WebContext
isRequestFinished
in class AbstractWebContextWrapper
Copyright © 2006–2018 TinyGroup. All rights reserved.