mirror of
https://gitee.com/BDWare/router-backend
synced 2025-01-26 01:34:04 +00:00
merge dengshuang-feature
refactor: NetworkManager
This commit is contained in:
parent
f150621008
commit
3ab558bf10
@ -1464,6 +1464,22 @@ public class NodeCenterActions {
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Action(async = true)
|
||||||
|
public void queryNodeAddress(JsonObject args, final ResultCallback rc) {
|
||||||
|
args.addProperty("action", "onQueryNodeAddress");
|
||||||
|
args.add("responseID", args.get("requestID"));
|
||||||
|
args.add("result", JsonNull.INSTANCE);
|
||||||
|
String nodePubkey = args.get("pubKey").getAsString();
|
||||||
|
CMNode nodeInfo = nodeInfos.get(nodePubkey);
|
||||||
|
if (nodeInfo != null) {
|
||||||
|
JsonObject jo = new JsonObject();
|
||||||
|
jo.addProperty("pubKey", nodePubkey);
|
||||||
|
jo.addProperty("masterAddress", nodeInfo.masterAddress);
|
||||||
|
args.add("result", jo);
|
||||||
|
}
|
||||||
|
rc.onResult(args);
|
||||||
|
}
|
||||||
|
|
||||||
@Action(async = true)
|
@Action(async = true)
|
||||||
public void queryRouteInfo(JsonObject args, final ResultCallback rc) {
|
public void queryRouteInfo(JsonObject args, final ResultCallback rc) {
|
||||||
String contractID = args.get("contractID").getAsString();
|
String contractID = args.get("contractID").getAsString();
|
||||||
@ -1685,6 +1701,7 @@ public class NodeCenterActions {
|
|||||||
controller.sendMsg(JsonUtil.toJson(to));
|
controller.sendMsg(JsonUtil.toJson(to));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Action(async = true)
|
@Action(async = true)
|
||||||
public void askElectMasterTimeRecorder(JsonObject args, ResultCallback resultCallback) {
|
public void askElectMasterTimeRecorder(JsonObject args, ResultCallback resultCallback) {
|
||||||
String data = "null";
|
String data = "null";
|
||||||
|
Loading…
Reference in New Issue
Block a user