org.springframework.web.context.request.async

## Class 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.
  Since:
    3.2
  Author:
    Rossen Stoyanchev

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `WEB_ASYNC_MANAGER_ATTRIBUTE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebAsyncUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AsyncWebRequest` | `createAsyncWebRequest(HttpServletRequest request, HttpServletResponse response)` Create an AsyncWebRequest instance.
    `static WebAsyncManager` | `getAsyncManager(ServletRequest servletRequest)` Obtain the `WebAsyncManager` for the current request, or if not found, create and associate it with the request.
    `static WebAsyncManager` | `getAsyncManager(WebRequest webRequest)` Obtain the `WebAsyncManager` for the current request, or if not found, create and associate it with the request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### WEB_ASYNC_MANAGER_ATTRIBUTE

          public static final String WEB_ASYNC_MANAGER_ATTRIBUTE

  - ### Constructor Detail

    - #### WebAsyncUtils

          public WebAsyncUtils()

  - ### Method Detail

    - #### getAsyncManager

          public static WebAsyncManager getAsyncManager(ServletRequest servletRequest)

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

    - #### getAsyncManager

          public static WebAsyncManager getAsyncManager(WebRequest webRequest)

      Obtain the `WebAsyncManager` 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 of `StandardServletAsyncWebRequest` is created if running in Servlet 3.0 (or higher) environment or as a fallback, an instance of `NoSupportAsyncWebRequest` is returned.
      Parameters:
        `request` - the current request
        `response` - the current response
      Returns:
        an AsyncWebRequest instance, never `null`