Class CallableProcessingInterceptorAdapter
- java.lang.Object
- org.springframework.web.context.request.async.CallableProcessingInterceptorAdapter
- All Implemented Interfaces:
CallableProcessingInterceptor
- Direct Known Subclasses:
TimeoutCallableProcessingInterceptor
public abstract class CallableProcessingInterceptorAdapter extends Object implements CallableProcessingInterceptor
Abstract adapter class for theCallableProcessingInterceptor
interface, for simplified implementation of individual methods.- Since:
- 3.2
- Author:
- Rossen Stoyanchev, Rob Winch
Field Summary
Fields inherited from interface org.springframework.web.context.request.async.CallableProcessingInterceptor
RESPONSE_HANDLED, RESULT_NONE
Constructor Summary
Constructors Constructor Description CallableProcessingInterceptorAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
afterCompletion(NativeWebRequest request, Callable<T> task)
This implementation is empty.<T> void
beforeConcurrentHandling(NativeWebRequest request, Callable<T> task)
This implementation is empty.<T> Object
handleTimeout(NativeWebRequest request, Callable<T> task)
This implementation always returnsRESULT_NONE
.<T> void
postProcess(NativeWebRequest request, Callable<T> task, Object concurrentResult)
This implementation is empty.<T> void
preProcess(NativeWebRequest request, Callable<T> task)
This implementation is empty.
Constructor Detail
CallableProcessingInterceptorAdapter
public CallableProcessingInterceptorAdapter()
Method Detail
beforeConcurrentHandling
public <T> void beforeConcurrentHandling(NativeWebRequest request, Callable<T> task) throws Exception
This implementation is empty.- Specified by:
beforeConcurrentHandling
in interfaceCallableProcessingInterceptor
- Parameters:
request
- the current requesttask
- the task for the current async request- Throws:
Exception
- in case of errors
preProcess
public <T> void preProcess(NativeWebRequest request, Callable<T> task) throws Exception
This implementation is empty.- Specified by:
preProcess
in interfaceCallableProcessingInterceptor
- Parameters:
request
- the current requesttask
- the task for the current async request- Throws:
Exception
- in case of errors
postProcess
public <T> void postProcess(NativeWebRequest request, Callable<T> task, Object concurrentResult) throws Exception
This implementation is empty.- Specified by:
postProcess
in interfaceCallableProcessingInterceptor
- Parameters:
request
- the current requesttask
- the task for the current async requestconcurrentResult
- the result of concurrent processing, which could be aThrowable
if theCallable
raised an exception- Throws:
Exception
- in case of errors
handleTimeout
public <T> Object handleTimeout(NativeWebRequest request, Callable<T> task) throws Exception
This implementation always returnsRESULT_NONE
.- Specified by:
handleTimeout
in interfaceCallableProcessingInterceptor
- Parameters:
request
- the current requesttask
- the task for the current async request- Returns:
- a concurrent result value; if the value is anything other than
CallableProcessingInterceptor.RESULT_NONE
orCallableProcessingInterceptor.RESPONSE_HANDLED
, concurrent processing is resumed and subsequent interceptors are not invoked - Throws:
Exception
- in case of errors
afterCompletion
public <T> void afterCompletion(NativeWebRequest request, Callable<T> task) throws Exception
This implementation is empty.- Specified by:
afterCompletion
in interfaceCallableProcessingInterceptor
- Parameters:
request
- the current requesttask
- the task for the current async request- Throws:
Exception
- in case of errors