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
FieldsModifier and TypeFieldDescriptionstatic final StringThe name attribute containing theWebAsyncManager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncWebRequestcreateAsyncWebRequest(HttpServletRequest request, HttpServletResponse response) Create an AsyncWebRequest instance.static WebAsyncManagergetAsyncManager(ServletRequest servletRequest) Obtain theWebAsyncManagerfor the current request, or if not found, create and associate it with the request.static WebAsyncManagergetAsyncManager(WebRequest webRequest) Obtain theWebAsyncManagerfor 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 theWebAsyncManagerfor the current request, or if not found, create and associate it with the request. -
getAsyncManager
Obtain theWebAsyncManagerfor 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 ofStandardServletAsyncWebRequestgets created.- Parameters:
request- the current requestresponse- the current response- Returns:
- an AsyncWebRequest instance (never
null)
-