|
Spring Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
org.springframework.web.context.support.ContextExposingHttpServletRequest
public class ContextExposingHttpServletRequest
HttpServletRequest decorator that makes all Spring beans in a given WebApplicationContext accessible as request attributes, through lazy checking once an attribute gets accessed.
| Field Summary |
|---|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
ContextExposingHttpServletRequest(javax.servlet.http.HttpServletRequest originalRequest,
WebApplicationContext context)
Create a new ContextExposingHttpServletRequest for the given request. |
|
ContextExposingHttpServletRequest(javax.servlet.http.HttpServletRequest originalRequest,
WebApplicationContext context,
java.util.Set<java.lang.String> exposedContextBeanNames)
Create a new ContextExposingHttpServletRequest for the given request. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
|
WebApplicationContext |
getWebApplicationContext()
Return the WebApplicationContext that this request runs in. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
| Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
|---|
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout |
| Methods inherited from class javax.servlet.ServletRequestWrapper |
|---|
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setCharacterEncoding, setRequest, startAsync, startAsync |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setCharacterEncoding, startAsync, startAsync |
| Constructor Detail |
|---|
public ContextExposingHttpServletRequest(javax.servlet.http.HttpServletRequest originalRequest,
WebApplicationContext context)
originalRequest - the original HttpServletRequestcontext - the WebApplicationContext that this request runs in
public ContextExposingHttpServletRequest(javax.servlet.http.HttpServletRequest originalRequest,
WebApplicationContext context,
java.util.Set<java.lang.String> exposedContextBeanNames)
originalRequest - the original HttpServletRequestcontext - 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)| Method Detail |
|---|
public final WebApplicationContext getWebApplicationContext()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletRequestgetAttribute in class javax.servlet.ServletRequestWrapper
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.ServletRequestsetAttribute in class javax.servlet.ServletRequestWrapper
|
Spring Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||