From 2c1dbe63de3d370d0b0f20fea474326e88b9ca23 Mon Sep 17 00:00:00 2001 From: lawrencehj <1934378145@qq.com> Date: 星期三, 10 三月 2021 14:39:40 +0800 Subject: [PATCH] 增加接收Bye请求后停止向上级推流功能 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java | 29 ++++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java index f9c8d25..ab72be5 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java @@ -1,7 +1,7 @@ package com.genersoft.iot.vmp.gb28181.transmit.callback; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -9,21 +9,40 @@ import org.springframework.web.context.request.async.DeferredResult; /** - * @Description:TODO(杩欓噷鐢ㄤ竴鍙ヨ瘽鎻忚堪杩欎釜绫荤殑浣滅敤) - * @author: songww + * @Description: 寮傛璇锋眰澶勭悊 + * @author: swwheihei * @date: 2020骞�5鏈�8鏃� 涓嬪崍7:59:05 */ +@SuppressWarnings(value = {"rawtypes", "unchecked"}) @Component public class DeferredResultHolder { + public static final String CALLBACK_CMD_DEVICESTATUS = "CALLBACK_DEVICESTATUS"; + public static final String CALLBACK_CMD_DEVICEINFO = "CALLBACK_DEVICEINFO"; + + public static final String CALLBACK_CMD_DEVICECONTROL = "CALLBACK_DEVICECONTROL"; + + public static final String CALLBACK_CMD_DEVICECONFIG = "CALLBACK_DEVICECONFIG"; + + public static final String CALLBACK_CMD_CONFIGDOWNLOAD = "CALLBACK_CONFIGDOWNLOAD"; public static final String CALLBACK_CMD_CATALOG = "CALLBACK_CATALOG"; public static final String CALLBACK_CMD_RECORDINFO = "CALLBACK_RECORDINFO"; - private Map<String, DeferredResult> map = new HashMap<String, DeferredResult>(); - + public static final String CALLBACK_CMD_PlAY = "CALLBACK_PLAY"; + + public static final String CALLBACK_CMD_STOP = "CALLBACK_STOP"; + + public static final String CALLBACK_CMD_MOBILEPOSITION = "CALLBACK_MOBILEPOSITION"; + + public static final String CALLBACK_CMD_PRESETQUERY = "CALLBACK_PRESETQUERY"; + + public static final String CALLBACK_CMD_ALARM = "CALLBACK_ALARM"; + + private Map<String, DeferredResult> map = new ConcurrentHashMap<String, DeferredResult>(); + public void put(String key, DeferredResult result) { map.put(key, result); } -- Gitblit v1.8.0