Package org.springframework.web.context.request.async

Examples of org.springframework.web.context.request.async.WebAsyncTask.onTimeout()


                Thread.sleep(2L * 1000);
                return "success";
            }
        });

        webAsyncTask.onTimeout(new Callable() {
            @Override
            public Object call() throws Exception {
                System.out.println("====异步任务超时了");
                return "error";
            }
View Full Code Here


                Thread.sleep(20L * 1000);
                return "success";
            }
        });

        webAsyncTask.onTimeout(new Callable() {
            @Override
            public Object call() throws Exception {
                System.out.println("====异步任务超时了");
                return "error";
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.