Package com.alibaba.dubbo.examples.callback.api

Examples of com.alibaba.dubbo.examples.callback.api.CallbackService.addListener()


    public static void main(String[] args) throws Exception {
        String config = CallbackConsumer.class.getPackage().getName().replace('.', '/') + "/callback-consumer.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
        context.start();
        CallbackService callbackService = (CallbackService) context.getBean("callbackService");
        callbackService.addListener("foo.bar", new CallbackListener() {
            public void changed(String msg) {
                System.out.println("callback1:" + msg);
            }
        });
        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.