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 theCallableProcessingInterceptorinterface, 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> voidafterCompletion(NativeWebRequest request, Callable<T> task)This implementation is empty.<T> voidbeforeConcurrentHandling(NativeWebRequest request, Callable<T> task)This implementation is empty.<T> ObjecthandleTimeout(NativeWebRequest request, Callable<T> task)This implementation always returnsRESULT_NONE.<T> voidpostProcess(NativeWebRequest request, Callable<T> task, Object concurrentResult)This implementation is empty.<T> voidpreProcess(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:
beforeConcurrentHandlingin 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:
preProcessin 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:
postProcessin interfaceCallableProcessingInterceptor- Parameters:
request- the current requesttask- the task for the current async requestconcurrentResult- the result of concurrent processing, which could be aThrowableif theCallableraised 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:
handleTimeoutin 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_NONEorCallableProcessingInterceptor.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:
afterCompletionin interfaceCallableProcessingInterceptor- Parameters:
request- the current requesttask- the task for the current async request- Throws:
Exception- in case of errors