接口 AsyncWebRequestInterceptor
- 所有超级接口:
WebRequestInterceptor
public interface AsyncWebRequestInterceptor extends WebRequestInterceptor
ExtendsWebRequestInterceptorwith a callback method invoked during asynchronous request handling.When a handler starts asynchronous request handling, the DispatcherServlet exits without invoking
postHandleandafterCompletion, as it normally does, since the results of request handling (e.g. ModelAndView) are not available in the current thread and handling is not yet complete. In such scenarios, theafterConcurrentHandlingStarted(WebRequest)method is invoked instead allowing implementations to perform tasks such as cleaning up thread bound attributes.When asynchronous handling completes, the request is dispatched to the container for further processing. At this stage the DispatcherServlet invokes
preHandle,postHandleandafterCompletionas usual.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
- 另请参阅:
WebAsyncManager
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidafterConcurrentHandlingStarted(WebRequest request)Called instead ofpostHandleandafterCompletion, when the handler started handling the request concurrently.从接口继承的方法 org.springframework.web.context.request.WebRequestInterceptor
afterCompletion, postHandle, preHandle
方法详细资料
afterConcurrentHandlingStarted
void afterConcurrentHandlingStarted(WebRequest request)
Called instead ofpostHandleandafterCompletion, when the handler started handling the request concurrently.- 参数:
request- the current request