@Test public void testProvider() throws ClassNotFoundException, NoSuchMethodException, IOException, IllegalAccessException, InvocationTargetException { IHelloService helloService = new SimpleHelloServiceImpl(); RpcFramework.export("127.0.0.1", 8888, helloService); }
@Test public void testConsumer() throws IOException { IHelloService helloService = RpcFramework.refer(IHelloService.class, "127.0.0.1", 8888); Hello hello = helloService.sayHello("sence", "hello"); System.out.print(hello); }