diff --git a/src/main/java/org/bdware/server/nodecenter/CMNode.java b/src/main/java/org/bdware/server/nodecenter/CMNode.java index dfad6bb..aea1042 100644 --- a/src/main/java/org/bdware/server/nodecenter/CMNode.java +++ b/src/main/java/org/bdware/server/nodecenter/CMNode.java @@ -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) { diff --git a/src/main/java/org/bdware/server/nodecenter/NodeCenterActions.java b/src/main/java/org/bdware/server/nodecenter/NodeCenterActions.java index 2b0f206..f71fb08 100644 --- a/src/main/java/org/bdware/server/nodecenter/NodeCenterActions.java +++ b/src/main/java/org/bdware/server/nodecenter/NodeCenterActions.java @@ -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); diff --git a/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java b/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java index 31e29b6..4496e87 100644 --- a/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java +++ b/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java @@ -31,7 +31,7 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler 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 } } - 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(); }