This commit is contained in:
wentch
2016-01-06 10:03:58 +08:00
parent e66ee1bab3
commit 8c22c3b05e

View File

@@ -5,6 +5,10 @@
*/
package org.redkale.test.sncp;
import java.lang.reflect.*;
import java.net.*;
import java.util.*;
import org.redkale.net.sncp.*;
import org.redkale.service.Service;
import org.redkale.util.Attribute;
import org.redkale.service.MultiRun;
@@ -66,4 +70,24 @@ public class SncpTestService implements Service {
return "result: " + bean;
}
public static void main(String[] args) throws Exception {
SncpTestService service = Sncp.createLocalService("", null, SncpTestService.class, new InetSocketAddress("127.0.0.1", 7070), new HashSet(), null, null);
for(Method method :service.getClass().getDeclaredMethods()) {
System.out.println(method);
}
System.out.println("-----------------------------------");
for(Method method :SncpClient.parseMethod(service.getClass())) {
System.out.println(method);
}
System.out.println("-----------------------------------");
service = Sncp.createRemoteService("", null, SncpTestService.class, new InetSocketAddress("127.0.0.1", 7070), new HashSet(), null);
for(Method method :service.getClass().getDeclaredMethods()) {
System.out.println(method);
}
System.out.println("-----------------------------------");
for(Method method :SncpClient.parseMethod(service.getClass())) {
System.out.println(method);
}
System.out.println("-----------------------------------");
}
}