Spring Framework DeferredResultProcessingInterceptorAdapter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DeferredResultProcessingInterceptorAdapter class.

This code example shows how to use the following methods:
/** 
 * <p>User: Zhang Kaitao 
 * <p>Date: 13-7-18 下午9:10 
 * <p>Version: 1.0 
 */ 
public class MyDeferredResultInterceptor extends DeferredResultProcessingInterceptorAdapter {
 
    @Override 
    public <T> void beforeConcurrentHandling(final NativeWebRequest request, final DeferredResult<T> deferredResult) throws Exception {
        System.out.println("=====在startAsyc开启异步之前执行");
    } 
 
    @Override 
    public <T> void preProcess(final NativeWebRequest request, final DeferredResult<T> deferredResult) throws Exception {
        //不同于Callable 它与beforeConcurrentHandling在同一个线程执行 
        System.out.println("在startAsyc开启异步之后执行");
    } 
 
    @Override 
    public <T> void postProcess(final NativeWebRequest request, final DeferredResult<T> deferredResult, final Object concurrentResult) throws Exception {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java