程序包 cn.taketoday.web
类 ContextExposingRequestContext
java.lang.Object
cn.taketoday.core.AttributeAccessorSupport
cn.taketoday.web.RequestContext
cn.taketoday.web.DecoratingRequestContext
cn.taketoday.web.RequestContextDecorator
cn.taketoday.web.ContextExposingRequestContext
- 所有已实现的接口:
cn.taketoday.core.AttributeAccessor,cn.taketoday.core.io.InputStreamSource,cn.taketoday.core.io.OutputStreamSource,HttpInputMessage,HttpMessage,HttpRequest,Serializable
RequestContext decorator that makes all beans in a
given WebApplicationContext accessible as request attributes,
through lazy checking once an attribute gets accessed.
- 从以下版本开始:
- 4.0 2022/2/5 14:27
- 作者:
- Harry Yang
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.web.RequestContext
RequestContext.RequestContextHttpOutputMessage -
字段概要
字段修饰符和类型字段说明private static final longprivate final cn.taketoday.context.ApplicationContext从类继承的字段 cn.taketoday.web.RequestContextDecorator
delegate从类继承的字段 cn.taketoday.web.RequestContext
applicationContext, asyncWebRequest, bindingContext, contextPath, cookies, corsRequestFlag, EMPTY_COOKIES, httpMethod, inputStream, locale, lookupPath, method, multipartFlag, multipartRequest, notModified, outputStream, parameters, pathWithinApplication, preFlightRequestFlag, queryString, reader, redirectModel, requestDestructionCallbacks, requestHeaders, requestPath, requestURI, responseContentType, responseCookies, responseHeaders, SCOPE_REQUEST, SCOPE_SESSION, uri, webAsyncManager, writer从类继承的字段 cn.taketoday.core.AttributeAccessorSupport
attributes -
构造器概要
构造器构造器说明ContextExposingRequestContext(RequestContext originalRequest, cn.taketoday.context.ApplicationContext context, Set<String> exposedContextBeanNames) Create a new ContextExposingRequestContext for the given request. -
方法概要
修饰符和类型方法说明cn.taketoday.context.ApplicationContextReturn the WebApplicationContext that this request runs in.getAttribute(String name) voidsetAttribute(String name, Object value) 从类继承的方法 cn.taketoday.web.RequestContextDecorator
equals, getDelegate从类继承的方法 cn.taketoday.web.DecoratingRequestContext
addCookie, addCookie, asHttpOutputMessage, attributeNames, binding, checkNotModified, checkNotModified, checkNotModified, clearAttributes, computeAttribute, copyAttributesFrom, createAsyncWebRequest, createMultipartRequest, createRequestHeaders, createResponseHeaders, doGetContextPath, doGetCookies, doGetInputStream, doGetLocale, doGetMethod, doGetOutputStream, doGetParameters, doGetQueryString, doGetReader, doGetRequestPath, doGetRequestURI, doGetWriter, flush, getAsyncManager, getAsyncWebRequest, getAttributeNames, getAttributes, getBinding, getBody, getContentLength, getContentType, getContextPath, getCookie, getCookies, getHeaders, getInputRedirectModel, getInputRedirectModel, getInputStream, getLocale, getLookupPath, getMatchingMetadata, getMethod, getMethodValue, getMultipartRequest, getOutputStream, getParameter, getParameterNames, getParameters, getParameters, getQueryString, getReader, getReader, getRemoteAddress, getRequestId, getRequestPath, getRequestTimeMillis, getRequestURI, getRequestURL, getResponseContentType, getScheme, getServerName, getServerPort, getStatus, getURI, getWriter, hasAttribute, hasAttributes, hasBinding, hashCode, hasMatchingMetadata, initId, isCommitted, isConcurrentHandlingStarted, isCorsRequest, isMultipart, isNotModified, isPreFlightRequest, matchingMetadata, mergeToResponse, nativeRequest, postGetParameters, postRequestCompleted, readableChannel, removeAttribute, removeCookie, requestCompleted, requestCompleted, requestHeaders, reset, responseCookies, responseHeaders, sendError, sendError, sendError, sendError, sendRedirect, setBinding, setContentLength, setContentType, setContentType, setMatchingMetadata, setStatus, setStatus, setWebAsyncManagerFactory, toString, unwrapRequest, writableChannel, writeHeaders从类继承的方法 cn.taketoday.web.RequestContext
getPort, getRequestProcessingTime, registerRequestDestructionCallback, registerRequestDestructionCallback, removeRequestDestructionCallback从类继承的方法 cn.taketoday.core.AttributeAccessorSupport
createAttributes
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
webApplicationContext
private final cn.taketoday.context.ApplicationContext webApplicationContext -
exposedContextBeanNames
-
explicitAttributes
-
-
构造器详细资料
-
ContextExposingRequestContext
public ContextExposingRequestContext(RequestContext originalRequest, cn.taketoday.context.ApplicationContext context, @Nullable Set<String> exposedContextBeanNames) Create a new ContextExposingRequestContext for the given request.- 参数:
originalRequest- the original RequestContextcontext- the WebApplicationContext that this request runs inexposedContextBeanNames- the names of beans in the context which are supposed to be exposed (if this is non-null, only the beans in this Set are eligible for exposure as attributes)
-
-
方法详细资料
-
getApplicationContext
public cn.taketoday.context.ApplicationContext getApplicationContext()Return the WebApplicationContext that this request runs in. -
getAttribute
- 指定者:
getAttribute在接口中cn.taketoday.core.AttributeAccessor- 覆盖:
getAttribute在类中DecoratingRequestContext
-
setAttribute
- 指定者:
setAttribute在接口中cn.taketoday.core.AttributeAccessor- 覆盖:
setAttribute在类中DecoratingRequestContext
-