提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.module.data.video.dahua; |
H |
2 |
|
|
3 |
import com.alibaba.fastjson.JSON; |
|
4 |
import com.iailab.module.data.common.utils.HttpRequest; |
|
5 |
import com.iailab.netsdk.lib.NetSDKLib; |
|
6 |
import com.sun.jna.Pointer; |
|
7 |
import org.slf4j.Logger; |
|
8 |
import org.slf4j.LoggerFactory; |
|
9 |
|
|
10 |
import java.util.HashMap; |
|
11 |
import java.util.Map; |
|
12 |
|
|
13 |
/** |
|
14 |
* 重连回调 |
|
15 |
* |
|
16 |
* @author PanZhibao |
|
17 |
* @Description |
|
18 |
* @createTime 2024年03月06日 |
|
19 |
*/ |
|
20 |
public class HaveReConnect implements NetSDKLib.fHaveReConnect { |
|
21 |
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
22 |
|
|
23 |
private String url = "http://127.0.0.1:8080/iailab/api/re-connect"; |
|
24 |
|
|
25 |
@Override |
|
26 |
public void invoke(NetSDKLib.LLong m_hLoginHandle, String pchDVRIP, int nDVRPort, Pointer dwUser) { |
|
27 |
logger.info("ReConnect Device[%s] Port[%d]\n", pchDVRIP, nDVRPort); |
|
28 |
|
|
29 |
Map<String, String> params = new HashMap<>(); |
|
30 |
params.put("pchDVRIP", pchDVRIP); |
|
31 |
params.put("nDVRPort", Integer.valueOf(nDVRPort).toString()); |
|
32 |
HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); |
|
33 |
} |
|
34 |
} |