Package com.alibaba.dubbo.examples.async.api

Examples of com.alibaba.dubbo.examples.async.api.AsyncService.sayHello()


       
        final AsyncService asyncService = (AsyncService)context.getBean("asyncService");
       
        Future<String> f = RpcContext.getContext().asyncCall(new Callable<String>() {
            public String call() throws Exception {
                return asyncService.sayHello("async call request");
            }
        });
       
        System.out.println("async call ret :" + f.get());
       
View Full Code Here


       
        System.out.println("async call ret :" + f.get());
       
        RpcContext.getContext().asyncCall(new Runnable() {
            public void run() {
                asyncService.sayHello("oneway call request1");
                asyncService.sayHello("oneway call request2");
            }
        });
       
        System.in.read();
View Full Code Here

        System.out.println("async call ret :" + f.get());
       
        RpcContext.getContext().asyncCall(new Runnable() {
            public void run() {
                asyncService.sayHello("oneway call request1");
                asyncService.sayHello("oneway call request2");
            }
        });
       
        System.in.read();
    }
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.