Top Description Fields Constructors Methods
org.springframework.web.context.request.async

public abstract Class WebAsyncUtils

extends Object
Class Inheritance
Imports
jakarta.servlet.ServletRequest, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, org.springframework.web.context.request.RequestAttributes, .WebRequest

Utility methods related to processing asynchronous web requests.
Authors
Rossen Stoyanchev, Juergen Hoeller
Since
3.2

Field Summary

Modifier and TypeField and Description
public static final String
WEB_ASYNC_MANAGER_ATTRIBUTE

The name attribute containing the WebAsyncManager.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static AsyncWebRequest

Returns:

an AsyncWebRequest instance (never null)
createAsyncWebRequest
(HttpServletRequest
the current request
request
,
HttpServletResponse
the current response
response
)

Create an AsyncWebRequest instance.

public static WebAsyncManager
getAsyncManager(ServletRequest servletRequest)

Obtain the WebAsyncManager for the current request, or if not found, create and associate it with the request.

public static WebAsyncManager
getAsyncManager(WebRequest webRequest)

Obtain the WebAsyncManager for the current request, or if not found, create and associate it with the request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

WEB_ASYNC_MANAGER_ATTRIBUTEback to summary
public static final String WEB_ASYNC_MANAGER_ATTRIBUTE

The name attribute containing the WebAsyncManager.

Constructor Detail

WebAsyncUtilsback to summary
public WebAsyncUtils()

Method Detail

createAsyncWebRequestback to summary
public static AsyncWebRequest createAsyncWebRequest(HttpServletRequest request, HttpServletResponse response)

Create an AsyncWebRequest instance. By default, an instance of StandardServletAsyncWebRequest gets created.

Parameters
request:HttpServletRequest

the current request

response:HttpServletResponse

the current response

Returns:AsyncWebRequest

an AsyncWebRequest instance (never null)

getAsyncManagerback to summary
public static WebAsyncManager getAsyncManager(ServletRequest servletRequest)

Obtain the WebAsyncManager for the current request, or if not found, create and associate it with the request.

getAsyncManagerback to summary
public static WebAsyncManager getAsyncManager(WebRequest webRequest)

Obtain the WebAsyncManager for the current request, or if not found, create and associate it with the request.