org.springframework.web.context.request.async

## Class DeferredResultProcessingInterceptorAdapter

- java.lang.Object
- - org.springframework.web.context.request.async.DeferredResultProcessingInterceptorAdapter

- All Implemented Interfaces:
    DeferredResultProcessingInterceptor
  Direct Known Subclasses:
    TimeoutDeferredResultProcessingInterceptor

      public abstract class DeferredResultProcessingInterceptorAdapter
      extends Object
      implements DeferredResultProcessingInterceptor

  Abstract adapter class for the `DeferredResultProcessingInterceptor` interface for simplified implementation of individual methods.
  Since:
    3.2
  Author:
    Rossen Stoyanchev, Rob Winch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeferredResultProcessingInterceptorAdapter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> void` | `afterCompletion(NativeWebRequest request, DeferredResult<T> deferredResult)` This implementation is empty.
    `<T> void` | `beforeConcurrentHandling(NativeWebRequest request, DeferredResult<T> deferredResult)` This implementation is empty.
    `<T> boolean` | `handleTimeout(NativeWebRequest request, DeferredResult<T> deferredResult)` This implementation returns `true` by default.
    `<T> void` | `postProcess(NativeWebRequest request, DeferredResult<T> deferredResult, Object concurrentResult)` This implementation is empty.
    `<T> void` | `preProcess(NativeWebRequest request, DeferredResult<T> deferredResult)` This implementation is empty.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DeferredResultProcessingInterceptorAdapter

          public DeferredResultProcessingInterceptorAdapter()

  - ### Method Detail

    - #### beforeConcurrentHandling

          public <T> void beforeConcurrentHandling(NativeWebRequest request,
                                          DeferredResult<T> deferredResult)
                                        throws Exception

      This implementation is empty.
      Specified by:
        `beforeConcurrentHandling` in interface `DeferredResultProcessingInterceptor`
      Parameters:
        `request` - the current request
        `deferredResult` - the DeferredResult for the current request
      Throws:
        `Exception` - in case of errors

    - #### preProcess

          public <T> void preProcess(NativeWebRequest request,
                            DeferredResult<T> deferredResult)
                          throws Exception

      This implementation is empty.
      Specified by:
        `preProcess` in interface `DeferredResultProcessingInterceptor`
      Parameters:
        `request` - the current request
        `deferredResult` - the DeferredResult for the current request
      Throws:
        `Exception` - in case of errors

    - #### postProcess

          public <T> void postProcess(NativeWebRequest request,
                             DeferredResult<T> deferredResult,
                             Object concurrentResult)
                           throws Exception

      This implementation is empty.
      Specified by:
        `postProcess` in interface `DeferredResultProcessingInterceptor`
      Parameters:
        `request` - the current request
        `deferredResult` - the DeferredResult for the current request
        `concurrentResult` - the result to which the `DeferredResult`
      Throws:
        `Exception` - in case of errors

    - #### handleTimeout

          public <T> boolean handleTimeout(NativeWebRequest request,
                                  DeferredResult<T> deferredResult)
                                throws Exception

      This implementation returns `true` by default.
      Specified by:
        `handleTimeout` in interface `DeferredResultProcessingInterceptor`
      Parameters:
        `request` - the current request
        `deferredResult` - the DeferredResult for the current request; if the `DeferredResult` is set, then concurrent processing is resumed and subsequent interceptors are not invoked
      Returns:
        `true` if processing should continue, or `false` if other interceptors should not be invoked
      Throws:
        `Exception` - in case of errors

    - #### afterCompletion

          public <T> void afterCompletion(NativeWebRequest request,
                                 DeferredResult<T> deferredResult)
                               throws Exception

      This implementation is empty.
      Specified by:
        `afterCompletion` in interface `DeferredResultProcessingInterceptor`
      Parameters:
        `request` - the current request
        `deferredResult` - the DeferredResult for the current request
      Throws:
        `Exception` - in case of errors