public class TimeoutDeferredResultProcessingInterceptor extends DeferredResultProcessingInterceptorAdapter
Note that according to RFC 2616, a 503 without a 'Retry-After' header is interpreted as a 500 error and the client should not retry. Applications can install their own interceptor to handle a timeout and add a 'Retry-After' header if necessary.
Constructor and Description |
---|
TimeoutDeferredResultProcessingInterceptor() |
Modifier and Type | Method and Description |
---|---|
<T> boolean |
handleTimeout(NativeWebRequest request,
DeferredResult<T> deferredResult)
This implementation returns
true by default. |
afterCompletion, beforeConcurrentHandling, postProcess, preProcess
public TimeoutDeferredResultProcessingInterceptor()
public <T> boolean handleTimeout(NativeWebRequest request, DeferredResult<T> deferredResult) throws Exception
DeferredResultProcessingInterceptorAdapter
true
by default.handleTimeout
in interface DeferredResultProcessingInterceptor
handleTimeout
in class DeferredResultProcessingInterceptorAdapter
request
- the current requestdeferredResult
- the DeferredResult for the current request; if the
DeferredResult
is set, then concurrent processing is resumed and
subsequent interceptors are not invokedtrue
if processing should continue, or false
if
other interceptors should not be invokedException
- in case of errors