增加多网IP探测上报

This commit is contained in:
qiminbao
2025-10-28 14:26:41 +08:00
parent a26981a92e
commit c8980142d8
2 changed files with 17 additions and 1 deletions
@@ -75,7 +75,9 @@ public enum MsgEnum {
Agent版本更新("AGENT_VERSION_UPDATE"), Agent版本更新("AGENT_VERSION_UPDATE"),
Agent版本更新应答("AGENT_VERSION_UPDATE_RSP"); Agent版本更新应答("AGENT_VERSION_UPDATE_RSP"),
多网IP探测上报("NETWORK_DETECT");
private String value; private String value;
@@ -400,6 +400,20 @@ public class AgentEndpoint {
} }
} }
@AgentDispatcher(msgId = MsgEnum.多网IP探测上报)
public class DetectNetworkHandler implements AgentHandler {
@Override
public UpMsgResponse upHandle(String data, String clientId) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("clientId", clientId);
jsonObject.put("dataType", MsgEnum.多网IP探测上报.getValue());
jsonObject.put("data", data);
MqMsg mqMsg = MqMsg.builder().topic(agentMqConfig.getAgentTopic()).content(jsonObject.toString()).build();
agentProducer.asyncSend(mqMsg);
return null;
}
}