|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncWebRequestInterceptor
Extends WebRequestInterceptor
with lifecycle methods specific to async
request processing.
This is the sequence of events on the main thread in an async scenario:
WebRequestInterceptor.preHandle(WebRequest)
getAsyncCallable(WebRequest)
postHandleAsyncStarted(WebRequest)
This is the sequence of events on the async thread:
Callable.call()
(the Callable
returned by getAsyncCallable
)
WebRequestInterceptor.postHandle(WebRequest, org.springframework.ui.ModelMap)
WebRequestInterceptor.afterCompletion(WebRequest, Exception)
Method Summary | |
---|---|
AbstractDelegatingCallable |
getAsyncCallable(WebRequest request)
Invoked after WebRequestInterceptor.preHandle(WebRequest) and before
the handler is executed. |
void |
postHandleAsyncStarted(WebRequest request)
Invoked after the execution of a handler if the handler started async processing instead of handling the request. |
Methods inherited from interface org.springframework.web.context.request.WebRequestInterceptor |
---|
afterCompletion, postHandle, preHandle |
Method Detail |
---|
AbstractDelegatingCallable getAsyncCallable(WebRequest request)
WebRequestInterceptor.preHandle(WebRequest)
and before
the handler is executed. The returned Callable
is used only if
handler execution leads to teh start of async processing. It is invoked
the async thread before the request is handled fro.
Implementations can use this Callable
to initialize
ThreadLocal attributes on the async thread.
Callable
instance or null
void postHandleAsyncStarted(WebRequest request)
WebRequestInterceptor.postHandle(WebRequest, org.springframework.ui.ModelMap)
. The
postHandle
method is invoked after the request is handled
in the async thread.
Implementations of this method can ensure ThreadLocal attributes bound to the main thread are cleared and also prepare for binding them to the async thread.
|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |