예제 #1
0
 @Test
 public void testProvider()
     throws ClassNotFoundException, NoSuchMethodException, IOException, IllegalAccessException,
         InvocationTargetException {
   IHelloService helloService = new SimpleHelloServiceImpl();
   RpcFramework.export("127.0.0.1", 8888, helloService);
 }
예제 #2
0
 @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);
 }