AsyncGrailsWebRequest (Grails 3.2.7)
Date: 2017-03-06

Package: grails.async.web

## [Groovy] Class AsyncGrailsWebRequest

- grails.async.web.AsyncGrailsWebRequest

- All Implemented Interfaces and Traits:
    org.springframework.web.context.request.async.AsyncWebRequest, javax.servlet.AsyncListener

      @groovy.transform.CompileStatic
      class AsyncGrailsWebRequest
      extends GrailsWebRequest

  Implementation of Spring 4.0 org.springframework.web.context.request.async.AsyncWebRequest interface for Grails

  Authors:
    Graeme Rocher
  Since:
    3.0

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class GrailsWebRequest` | `ID_PARAMETER`
    `class org.springframework.web.servlet.handler.DispatcherServletWebRequest` | `SCOPE_REQUEST, SCOPE_SESSION, SCOPE_GLOBAL_SESSION, REFERENCE_REQUEST, REFERENCE_SESSION, DESTRUCTION_CALLBACK_NAME_PREFIX`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.lang.String` | `WEB_REQUEST`
    `javax.servlet.AsyncContext` | `asyncContext`
    `java.util.List<java.lang.Runnable>` | `completionHandlers`
    `java.lang.Long` | `timeout`
    `java.util.List<java.lang.Runnable>` | `timeoutHandlers`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AsyncGrailsWebRequest (javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, GrailsApplicationAttributes attributes)`
    `AsyncGrailsWebRequest (javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)`
    `AsyncGrailsWebRequest (javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, org.springframework.context.ApplicationContext applicationContext)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `addCompletionHandler(java.lang.Runnable runnable)`
    `void` | `addTimeoutHandler(java.lang.Runnable runnable)`
    `void` | `dispatch()`
    `boolean` | `isAsyncComplete()`
    `boolean` | `isAsyncStarted()`
    `static AsyncGrailsWebRequest` | `lookup(javax.servlet.http.HttpServletRequest request)` Looks up the GrailsWebRequest from the current request.
    `void` | `onComplete(javax.servlet.AsyncEvent event)`
    `void` | `onError(javax.servlet.AsyncEvent event)`
    `void` | `onStartAsync(javax.servlet.AsyncEvent event)`
    `void` | `onTimeout(javax.servlet.AsyncEvent event)`
    `void` | `startAsync()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GrailsWebRequest` | `addParameterListener, addParametersFrom, getActionName, getApplicationContext, getAttributes, getBaseUrl, getContextPath, getControllerClass, getControllerName, getControllerNamespace, getCurrentRequest, getCurrentResponse, getEncodingStateRegistry, getFilteringCodec, getFilteringEncoder, getFlashScope, getId, getOut, getParameterMap, getParams, getPropertyEditorRegistry, getServletContext, getSession, getWrappedResponse, informParameterCreationListeners, isActive, isFlowRequest, isRenderView, isSkipFilteringCodec, lookup, lookup, lookupFilteringEncoder, requestCompleted, resetParams, setActionName, setControllerName, setControllerNamespace, setFilteringCodec, setFilteringEncoder, setId, setMultipartRequest, setOut, setRenderView, setSkipFilteringCodec, setWrappedResponse`
    `class org.springframework.web.servlet.handler.DispatcherServletWebRequest` | `org.springframework.web.servlet.handler.DispatcherServletWebRequest#getLocale(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getParameter(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#toString(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getDescription(boolean), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getParameterNames(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getParameterValues(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getParameterMap(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#isSecure(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getHeaderNames(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getContextPath(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getRemoteUser(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#isUserInRole(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getUserPrincipal(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getHeader(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getNativeRequest(java.lang.Class), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getNativeRequest(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getNativeResponse(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getNativeResponse(java.lang.Class), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getHttpMethod(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getHeaderValues(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#checkNotModified(long), org.springframework.web.servlet.handler.DispatcherServletWebRequest#checkNotModified(java.lang.String, long), org.springframework.web.servlet.handler.DispatcherServletWebRequest#checkNotModified(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#isNotModified(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#removeAttribute(java.lang.String, int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#setAttribute(java.lang.String, java.lang.Object, int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getAttribute(java.lang.String, int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getAttributeNames(int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getRequest(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getResponse(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#registerDestructionCallback(java.lang.String, java.lang.Runnable, int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#resolveReference(java.lang.String), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getSessionId(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getSessionMutex(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#requestCompleted(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#wait(long, int), org.springframework.web.servlet.handler.DispatcherServletWebRequest#wait(long), org.springframework.web.servlet.handler.DispatcherServletWebRequest#wait(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#equals(java.lang.Object), org.springframework.web.servlet.handler.DispatcherServletWebRequest#hashCode(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#getClass(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#notify(), org.springframework.web.servlet.handler.DispatcherServletWebRequest#notifyAll()`

- - ### Property Detail

    - #### static final java.lang.String WEB_REQUEST

    - #### javax.servlet.AsyncContext asyncContext

    - #### java.util.List<java.lang.Runnable> completionHandlers

    - #### java.lang.Long timeout

    - #### java.util.List<java.lang.Runnable> timeoutHandlers

  - ### Constructor Detail

    - #### AsyncGrailsWebRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, GrailsApplicationAttributes attributes)

    - #### AsyncGrailsWebRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)

    - #### AsyncGrailsWebRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, org.springframework.context.ApplicationContext applicationContext)

  - ### Method Detail

    - #### @java.lang.Override void addCompletionHandler(java.lang.Runnable runnable)

    - #### @java.lang.Override void addTimeoutHandler(java.lang.Runnable runnable)

    - #### @java.lang.Override void dispatch()

    - #### @java.lang.Override boolean isAsyncComplete()

    - #### @java.lang.Override boolean isAsyncStarted()

    - #### static AsyncGrailsWebRequest lookup(javax.servlet.http.HttpServletRequest request)

      Looks up the GrailsWebRequest from the current request.

      Parameters:
        `request` - The current request
      Returns:
        The GrailsWebRequest

    - #### @java.lang.Override void onComplete(javax.servlet.AsyncEvent event)

    - #### @java.lang.Override void onError(javax.servlet.AsyncEvent event)

    - #### @java.lang.Override void onStartAsync(javax.servlet.AsyncEvent event)

    - #### @java.lang.Override void onTimeout(javax.servlet.AsyncEvent event)

    - #### @java.lang.Override void startAsync()