接口 NativeWebRequest
- 所有超级接口:
RequestAttributes
,WebRequest
- 所有已知子接口:
AsyncWebRequest
- 所有已知实现类:
DispatcherServletWebRequest
,FacesWebRequest
,NoSupportAsyncWebRequest
,PortletWebRequest
,ServletWebRequest
,StandardServletAsyncWebRequest
public interface NativeWebRequest extends WebRequest
Extension of theWebRequest
interface, exposing the native request and response objects in a generic fashion.Mainly intended for framework-internal usage, in particular for generic argument resolution code.
- 从以下版本开始:
- 2.5.2
- 作者:
- Juergen Hoeller
字段概要
从接口继承的字段 org.springframework.web.context.request.RequestAttributes
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Object
getNativeRequest()
Return the underlying native request object.<T> T
getNativeRequest(Class<T> requiredType)
Return the underlying native request object, if available.Object
getNativeResponse()
Return the underlying native response object, if any.<T> T
getNativeResponse(Class<T> requiredType)
Return the underlying native response object, if available.从接口继承的方法 org.springframework.web.context.request.RequestAttributes
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttribute
从接口继承的方法 org.springframework.web.context.request.WebRequest
checkNotModified, checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getLocale, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isSecure, isUserInRole
方法详细资料
getNativeRequest
Object getNativeRequest()
Return the underlying native request object.
getNativeResponse
Object getNativeResponse()
Return the underlying native response object, if any.
getNativeRequest
<T> T getNativeRequest(Class<T> requiredType)
Return the underlying native request object, if available.- 参数:
requiredType
- the desired type of request object- 返回:
- the matching request object, or
null
if none of that type is available - 另请参阅:
HttpServletRequest
,ActionRequest
,RenderRequest
getNativeResponse
<T> T getNativeResponse(Class<T> requiredType)
Return the underlying native response object, if available.- 参数:
requiredType
- the desired type of response object- 返回:
- the matching response object, or
null
if none of that type is available - 另请参阅:
HttpServletResponse
,ActionResponse
,RenderResponse