Close
« Tutorial

Spring MVC - CallableProcessingInterceptor MCQ

0/13
0 ✓
0 ✗

1. What is the main purpose of CallableProcessingInterceptor?

2. Which method of CallableProcessingInterceptor is called in the original thread before concurrent handling starts?

3. Which method is called in the async thread before the Callable is actually invoked?

4. Which method is called after the Callable has produced a result?

5. What should handleTimeout return to indicate that no result should be used?

6. Which method was added to CallableProcessingInterceptor in Spring 5.0 to handle errors?

7. How can you register a CallableProcessingInterceptor for a specific request?

8. What is a key difference between CallableProcessingInterceptor and AsyncHandlerInterceptor?

9. In which thread is afterCompletion of CallableProcessingInterceptor typically invoked?

10. Given the following partial interceptor, which method is missing to handle a timeout?

public class MyInterceptor implements CallableProcessingInterceptor {
  @Override
  public void beforeConcurrentHandling(
      NativeWebRequest request, Callable task) { }
  // missing method
}

11. What is the correct return type of the preProcess method?

12. Which method would you override to log a message immediately after the async task finishes?

13. What is the correct parameter list for the postProcess method?

14. Which method is called from a container thread when an error occurs during async processing before the Callable completes?

15. Which of the following methods is NOT part of the CallableProcessingInterceptor interface?

Join