public class TimeoutCallableProcessingInterceptor extends CallableProcessingInterceptorAdapter
Note that according to RFC 7231, 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.
RESPONSE_HANDLED, RESULT_NONE
Constructor and Description |
---|
TimeoutCallableProcessingInterceptor() |
Modifier and Type | Method and Description |
---|---|
<T> Object |
handleTimeout(NativeWebRequest request,
Callable<T> task)
This implementation always returns
RESULT_NONE . |
afterCompletion, beforeConcurrentHandling, postProcess, preProcess
public TimeoutCallableProcessingInterceptor()
public <T> Object handleTimeout(NativeWebRequest request, Callable<T> task) throws Exception
CallableProcessingInterceptorAdapter
RESULT_NONE
.handleTimeout
in interface CallableProcessingInterceptor
handleTimeout
in class CallableProcessingInterceptorAdapter
request
- the current requesttask
- the task for the current async requestCallableProcessingInterceptor.RESULT_NONE
or CallableProcessingInterceptor.RESPONSE_HANDLED
, concurrent processing
is resumed and subsequent interceptors are not invokedException
- in case of errors