增加多网IP探测上报
This commit is contained in:
@@ -75,7 +75,9 @@ public enum MsgEnum {
|
||||
|
||||
Agent版本更新("AGENT_VERSION_UPDATE"),
|
||||
|
||||
Agent版本更新应答("AGENT_VERSION_UPDATE_RSP");
|
||||
Agent版本更新应答("AGENT_VERSION_UPDATE_RSP"),
|
||||
|
||||
多网IP探测上报("NETWORK_DETECT");
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user