ing
This commit is contained in:
parent
2d761824a7
commit
6d54e4e823
|
@ -38,6 +38,18 @@ public class RPCRegistry implements RPCInvoker {
|
||||||
return rService;
|
return rService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void registerService(Object receiver, Map<String, Method> methods) throws RPCException {
|
||||||
|
this.registerService(receiver, receiver.getClass().getName(), methods);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerService(Object receiver, String name, Map<String, Method> methods) throws RPCException {
|
||||||
|
RPCService rService = this.registerService(receiver, name);
|
||||||
|
|
||||||
|
methods.forEach((methodName, method)->{
|
||||||
|
rService.registerMethod(method, methodName);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasMethod(String method) {
|
public boolean hasMethod(String method) {
|
||||||
String[] sm = method.split(".");
|
String[] sm = method.split(".");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user