This commit is contained in:
Qing Wang
2020-10-21 22:34:03 +08:00
parent 90e834c960
commit 789705ea99
2 changed files with 24 additions and 7 deletions
@@ -16,6 +16,11 @@ public class BasicClientTest {
rpcClient.connect("127.0.0.1:9000");
CompletableFuture<Object> future = rpcClient.asyncFunc("add").invoke(Integer.class, 2, 3);
System.out.println("The result of add(2, 3) is " + future.get());
{
CompletableFuture<Object> future1 = rpcClient.asyncFunc("echo").invoke(String.class, "hello world!");
System.out.println("The result of echo is " + future1.get());
}
}
private String getClassStr(Object o) {