feat: remove unused functions

This commit is contained in:
Frank.R.Wu 2021-12-06 17:55:06 +08:00
parent bf14fd6adb
commit ba32cc25e7
3 changed files with 1 additions and 26 deletions

View File

@ -37,10 +37,6 @@ public class CMNode {
}
}
public void sendEvent(String msg) {
connection.controller.sendEvent(msg);
}
public String formatContractName(String contractIDOrName) {
if (null != contracts) {
for (ContractDesp desp : contracts) {

View File

@ -667,20 +667,6 @@ public class NodeCenterActions {
rc.onResult(JsonUtil.toJson(jo));
}
@Action(async = true)
public void deliverEvent(JsonObject json, ResultCallback cb) {
if (cb instanceof HttpResultCallback) {
Response r = new Response();
r.action = "deliverEvent";
r.data = "forbidden";
cb.onResult(JsonUtil.toJson(r));
return;
}
CMNode node = nodeInfos.get(json.get("target").getAsString());
node.sendEvent(json.get("msg").getAsString());
}
@Action
public void getLogSize(JsonObject json, ResultCallback cb) {
syncRequestCM(json, cb);

View File

@ -31,7 +31,7 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler<Object>
ChannelHandlerContext ctx;
public NodeCenterFrameHandler() {
actions = new NodeCenterActions(this);
this.actions = new NodeCenterActions(this);
MetaIndexAction.controller = this;
// TODO 添加那个UnitAction.
ae =
@ -146,13 +146,6 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler<Object>
}
}
public void sendEvent(String msg) {
Response r = new Response();
r.action = "deliverEvent";
r.data = msg;
sendMsg(JsonUtil.toJson(r));
}
public boolean isOpen() {
return ctx.channel().isOpen();
}