类 WebAsyncUtils
- java.lang.Object
- org.springframework.web.context.request.async.WebAsyncUtils
public abstract class WebAsyncUtils extends Object
Utility methods related to processing asynchronous web requests.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
字段概要
字段 修饰符和类型 字段 说明 static String
WEB_ASYNC_MANAGER_ATTRIBUTE
构造器概要
构造器 构造器 说明 WebAsyncUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static AsyncWebRequest
createAsyncWebRequest(HttpServletRequest request, HttpServletResponse response)
Create an AsyncWebRequest instance.static WebAsyncManager
getAsyncManager(ServletRequest servletRequest)
Obtain theWebAsyncManager
for the current request, or if not found, create and associate it with the request.static WebAsyncManager
getAsyncManager(WebRequest webRequest)
Obtain theWebAsyncManager
for the current request, or if not found, create and associate it with the request.
字段详细资料
WEB_ASYNC_MANAGER_ATTRIBUTE
public static final String WEB_ASYNC_MANAGER_ATTRIBUTE
构造器详细资料
WebAsyncUtils
public WebAsyncUtils()
方法详细资料
getAsyncManager
public static WebAsyncManager getAsyncManager(ServletRequest servletRequest)
Obtain theWebAsyncManager
for the current request, or if not found, create and associate it with the request.
getAsyncManager
public static WebAsyncManager getAsyncManager(WebRequest webRequest)
Obtain theWebAsyncManager
for the current request, or if not found, create and associate it with the request.
createAsyncWebRequest
public static AsyncWebRequest createAsyncWebRequest(HttpServletRequest request, HttpServletResponse response)
Create an AsyncWebRequest instance. By default, an instance ofStandardServletAsyncWebRequest
gets created when running in Servlet 3.0 (or higher) environment - as a fallback, an instance ofNoSupportAsyncWebRequest
will be returned.- 参数:
request
- the current requestresponse
- the current response- 返回:
- an AsyncWebRequest instance (never
null
)