Class WebAsyncUtils
java.lang.Object
org.springframework.web.context.request.async.WebAsyncUtils
Utility methods related to processing asynchronous web requests.
- Since:
- 3.2
- Author:
- Rossen Stoyanchev, Juergen Hoeller
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name attribute containing theWebAsyncManager
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
WEB_ASYNC_MANAGER_ATTRIBUTE
The name attribute containing theWebAsyncManager
.
-
-
Constructor Details
-
WebAsyncUtils
public WebAsyncUtils()
-
-
Method Details
-
getAsyncManager
Obtain theWebAsyncManager
for the current request, or if not found, create and associate it with the request. -
getAsyncManager
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.- Parameters:
request
- the current requestresponse
- the current response- Returns:
- an AsyncWebRequest instance (never
null
)
-