|
@@ -57,17 +57,16 @@ public class CenterClientHandler extends SimpleChannelInboundHandler<NettyMessag
|
|
|
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
|
|
log.info(location+">>>Connected to: {}", ctx.channel().remoteAddress());
|
|
|
//建立连接
|
|
|
- nettyClient.sendMessage(new NettyMessage("",200,"Pj4403070003","ZS"));
|
|
|
+ //nettyClient.sendMessage(new NettyMessage("",200,"Pj4403070003","ZS"));
|
|
|
//启动的时候发送消息,获取全部报警定义
|
|
|
- NettyMessage nettyMessage = new NettyMessage("",4,"Pj4403070003","ZS");
|
|
|
- JSONObject content = new JSONObject();
|
|
|
- content.put("groupCode", CommonConst.groupCode);
|
|
|
- content.put("projectId", CommonConst.projectId);
|
|
|
- nettyMessage.setContent(Arrays.asList(content));
|
|
|
- nettyClient.sendMessage(nettyMessage);
|
|
|
-
|
|
|
+ // NettyMessage nettyMessage = new NettyMessage("",4,"Pj4403070003","ZS");
|
|
|
+// JSONObject content = new JSONObject();
|
|
|
+// content.put("groupCode", CommonConst.groupCode);
|
|
|
+// content.put("projectId", CommonConst.projectId);
|
|
|
+// nettyMessage.setContent(Arrays.asList(content));
|
|
|
+// nettyClient.sendMessage(nettyMessage);
|
|
|
//内存中缓冲的未发送成功的数据发送出去
|
|
|
- iniAlarmResult(ctx);
|
|
|
+ // iniAlarmResult(ctx);
|
|
|
}
|
|
|
|
|
|
private void iniAlarmResult(ChannelHandlerContext ctx) {
|