接口 AsyncWebRequestInterceptor
- 所有超级接口:
WebRequestInterceptor
- 所有已知实现类:
Log4jNestedDiagnosticContextInterceptor
,OpenEntityManagerInViewInterceptor
,OpenSessionInViewInterceptor
,OpenSessionInViewInterceptor
,OpenSessionInViewInterceptor
public interface AsyncWebRequestInterceptor extends WebRequestInterceptor
ExtendsWebRequestInterceptor
with a callback method invoked during asynchronous request handling.When a handler starts asynchronous request handling, the DispatcherServlet exits without invoking
postHandle
andafterCompletion
, 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
,postHandle
andafterCompletion
as usual.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
- 另请参阅:
WebAsyncManager
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
afterConcurrentHandlingStarted(WebRequest request)
Called instead ofpostHandle
andafterCompletion
, when the the handler started handling the request concurrently.从接口继承的方法 org.springframework.web.context.request.WebRequestInterceptor
afterCompletion, postHandle, preHandle
方法详细资料
afterConcurrentHandlingStarted
void afterConcurrentHandlingStarted(WebRequest request)
Called instead ofpostHandle
andafterCompletion
, when the the handler started handling the request concurrently.- 参数:
request
- the current request