mirror of
https://gitee.com/BDWare/router-backend
synced 2025-01-26 09:44:04 +00:00
feat: remove unused functions
This commit is contained in:
parent
bf14fd6adb
commit
ba32cc25e7
@ -37,10 +37,6 @@ public class CMNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendEvent(String msg) {
|
|
||||||
connection.controller.sendEvent(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String formatContractName(String contractIDOrName) {
|
public String formatContractName(String contractIDOrName) {
|
||||||
if (null != contracts) {
|
if (null != contracts) {
|
||||||
for (ContractDesp desp : contracts) {
|
for (ContractDesp desp : contracts) {
|
||||||
|
@ -667,20 +667,6 @@ public class NodeCenterActions {
|
|||||||
rc.onResult(JsonUtil.toJson(jo));
|
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
|
@Action
|
||||||
public void getLogSize(JsonObject json, ResultCallback cb) {
|
public void getLogSize(JsonObject json, ResultCallback cb) {
|
||||||
syncRequestCM(json, cb);
|
syncRequestCM(json, cb);
|
||||||
|
@ -31,7 +31,7 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler<Object>
|
|||||||
ChannelHandlerContext ctx;
|
ChannelHandlerContext ctx;
|
||||||
|
|
||||||
public NodeCenterFrameHandler() {
|
public NodeCenterFrameHandler() {
|
||||||
actions = new NodeCenterActions(this);
|
this.actions = new NodeCenterActions(this);
|
||||||
MetaIndexAction.controller = this;
|
MetaIndexAction.controller = this;
|
||||||
// TODO 添加那个UnitAction.
|
// TODO 添加那个UnitAction.
|
||||||
ae =
|
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() {
|
public boolean isOpen() {
|
||||||
return ctx.channel().isOpen();
|
return ctx.channel().isOpen();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user