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, Juergen Hoeller
  • Field Details

    • WEB_ASYNC_MANAGER_ATTRIBUTE

      public static final String WEB_ASYNC_MANAGER_ATTRIBUTE
      The name attribute containing the WebAsyncManager.
  • Constructor Details

    • WebAsyncUtils

      public WebAsyncUtils()
  • Method Details

    • getAsyncManager

      public static WebAsyncManager getAsyncManager(jakarta.servlet.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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Create an AsyncWebRequest instance. By default, an instance of StandardServletAsyncWebRequest gets created.
      Parameters:
      request - the current request
      response - the current response
      Returns:
      an AsyncWebRequest instance (never null)