org.tinygroup.weblayer.webcontext.lazycommit.impl
类 LazyCommitWebContextImpl

java.lang.Object
  继承者 org.tinygroup.context.impl.BaseContextImpl
      继承者 org.tinygroup.context.impl.ContextImpl
          继承者 org.tinygroup.weblayer.webcontext.AbstractWebContextWrapper
              继承者 org.tinygroup.weblayer.webcontext.lazycommit.impl.LazyCommitWebContextImpl
所有已实现的接口:
Serializable, org.tinygroup.context.BaseContext, org.tinygroup.context.Context, WebContext, LazyCommitWebContext, TwoPhaseCommitWebContext

public class LazyCommitWebContextImpl
extends AbstractWebContextWrapper
implements LazyCommitWebContext

延迟提交response的实现。

作者:
renhui
另请参见:
序列化表格

字段摘要
 
从类 org.tinygroup.context.impl.BaseContextImpl 继承的字段
itemMap
 
构造方法摘要
LazyCommitWebContextImpl(WebContext wrappedContext)
          包装一个RequestContext对象。
 
方法摘要
 void commit()
          结束一个请求。
 void commitHeaders()
          提交headers
 String getErrorMessage()
          如果sendError()方法曾被调用,则该方法返回一个error信息。
 int getErrorStatus()
          如果sendError()方法曾被调用,则该方法返回一个error状态值。
 String getRedirectLocation()
          取得重定向的URI。
 int getStatus()
          取得最近设置的HTTP status。
 boolean isError()
          判断当前请求是否已出错。
 boolean isRedirected()
          判断当前请求是否已被重定向。
 
从类 org.tinygroup.weblayer.webcontext.AbstractWebContextWrapper 继承的方法
get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, putSubWebContext, setObject, setRequest, setResponse, setServletContext
 
从类 org.tinygroup.context.impl.ContextImpl 继承的方法
clear, clearSubContext, createSubContext, findNodeMap, get, getParent, getSubContext, getSubContextMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParent
 
从类 org.tinygroup.context.impl.BaseContextImpl 继承的方法
exist, get, getItemMap, put, remove, size
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 org.tinygroup.weblayer.WebContext 继承的方法
getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContext
 
从接口 org.tinygroup.context.Context 继承的方法
clearSubContext, createSubContext, get, getParent, getSubContext, getSubContextMap, put, putSubContext, remove, removeSubContext, setParent
 
从接口 org.tinygroup.context.BaseContext 继承的方法
clear, exist, get, get, getItemMap, put, remove, renameKey, size
 

构造方法详细信息

LazyCommitWebContextImpl

public LazyCommitWebContextImpl(WebContext wrappedContext)
包装一个RequestContext对象。

参数:
wrappedContext - 被包装的RequestContext
方法详细信息

isError

public boolean isError()
判断当前请求是否已出错。

指定者:
接口 LazyCommitWebContext 中的 isError
返回:
如果出错,则返回true

getErrorStatus

public int getErrorStatus()
如果sendError()方法曾被调用,则该方法返回一个error状态值。

指定者:
接口 LazyCommitWebContext 中的 getErrorStatus
返回:
error状态值,若系统正常,则返回0

getErrorMessage

public String getErrorMessage()
如果sendError()方法曾被调用,则该方法返回一个error信息。

指定者:
接口 LazyCommitWebContext 中的 getErrorMessage
返回:
error信息,若系统正常,则返回null

isRedirected

public boolean isRedirected()
判断当前请求是否已被重定向。

指定者:
接口 LazyCommitWebContext 中的 isRedirected
返回:
如果重定向,则返回true

getRedirectLocation

public String getRedirectLocation()
取得重定向的URI。

指定者:
接口 LazyCommitWebContext 中的 getRedirectLocation
返回:
重定向的URI,如果没有重定向,则返回null

getStatus

public int getStatus()
取得最近设置的HTTP status。

指定者:
接口 LazyCommitWebContext 中的 getStatus
返回:
HTTP status值

commitHeaders

public void commitHeaders()
                   throws LazyCommitFailedException
从接口 TwoPhaseCommitWebContext 复制的描述
提交headers

指定者:
接口 TwoPhaseCommitWebContext 中的 commitHeaders
抛出:
LazyCommitFailedException

commit

public void commit()
            throws LazyCommitFailedException
结束一个请求。

抛出:
LazyCommitFailedException - 如果失败


Copyright © 2006–2014 开源组织. All rights reserved.