List of usage examples for org.springframework.web.context.request.async AsyncWebRequest removeAttribute
void removeAttribute(String name, int scope);
From source file:org.springframework.web.context.request.async.WebAsyncManager.java
/** * Configure the {@link AsyncWebRequest} to use. This property may be set * more than once during a single request to accurately reflect the current * state of the request (e.g. following a forward, request/response * wrapping, etc). However, it should not be set while concurrent handling * is in progress, i.e. while {@link #isConcurrentHandlingStarted()} is * {@code true}.//from ww w.java 2 s. com * @param asyncWebRequest the web request to use */ public void setAsyncWebRequest(final AsyncWebRequest asyncWebRequest) { Assert.notNull(asyncWebRequest, "AsyncWebRequest must not be null"); this.asyncWebRequest = asyncWebRequest; this.asyncWebRequest.addCompletionHandler(() -> asyncWebRequest .removeAttribute(WebAsyncUtils.WEB_ASYNC_MANAGER_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST)); }