From f83bb3639a6bd172ba501d3e956e56d6ebdd9e98 Mon Sep 17 00:00:00 2001 From: lawrencehj <1934378145@qq.com> Date: Tue, 9 Mar 2021 20:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=92=8C=E6=AD=BB=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/conf/SipPlatformRunner.java | 1 - .../KeepaliveTimeoutListenerForPlatform.java | 6 ---- .../PlatformKeepaliveExpireEvent.java | 5 ++++ .../PlatformKeepaliveExpireEventLister.java | 9 +++--- .../PlatformNotRegisterEvent.java | 6 +++- .../PlatformNotRegisterEventLister.java | 9 ++---- .../cmd/ISIPCommanderForPlatform.java | 2 -- .../cmd/SIPRequestHeaderPlarformProvider.java | 5 ---- .../cmd/SIPRequestHeaderProvider.java | 5 ---- .../cmd/impl/SIPCommanderFroPlatform.java | 28 +++++++++---------- .../impl/RegisterResponseProcessor.java | 9 ------ .../vmp/media/zlm/ZLMHttpHookListener.java | 14 +++------- .../vmp/storager/IVideoManagerStorager.java | 6 +--- .../vmp/storager/dao/DeviceChannelMapper.java | 1 - .../iot/vmp/storager/dao/DeviceMapper.java | 1 - .../impl/VideoManagerStoragerImpl.java | 1 + .../vmanager/platform/PlatformController.java | 5 ---- .../iot/vmp/vmanager/play/PlayController.java | 3 -- .../service/impl/PlayServiceImpl.java | 2 -- 19 files changed, 36 insertions(+), 82 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java b/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java index 106b3cf2..075b30f2 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java @@ -3,7 +3,6 @@ package com.genersoft.iot.vmp.conf; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; import com.genersoft.iot.vmp.gb28181.event.EventPublisher; -import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java index 1420f147..3b2ceaab 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java @@ -1,11 +1,7 @@ package com.genersoft.iot.vmp.gb28181.event.offline; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.data.redis.connection.Message; -import org.springframework.data.redis.connection.MessageListener; import org.springframework.data.redis.listener.KeyExpirationEventMessageListener; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.stereotype.Component; @@ -13,8 +9,6 @@ import org.springframework.stereotype.Component; import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.gb28181.event.EventPublisher; -import java.nio.charset.StandardCharsets; - /** * @Description:设备心跳超时监听,借助redis过期特性,进行监听,监听到说明设备心跳超时,发送离线事件 * @author: swwheihei diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEvent.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEvent.java index 4ea9bc3e..1e9a2c4b 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEvent.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEvent.java @@ -7,6 +7,11 @@ import org.springframework.context.ApplicationEvent; */ public class PlatformKeepaliveExpireEvent extends ApplicationEvent { + /** + * Add default serial version ID + */ + private static final long serialVersionUID = 1L; + private String platformGbID; public PlatformKeepaliveExpireEvent(Object source) { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java index a7c786e4..c02b7e19 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java @@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.gb28181.event.platformKeepaliveExpire; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; -import com.genersoft.iot.vmp.gb28181.bean.PlatformRegister; import com.genersoft.iot.vmp.gb28181.event.EventPublisher; import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; @@ -52,14 +51,14 @@ public class PlatformKeepaliveExpireEventLister implements ApplicationListener

= 3) { // 有3次未收到心跳回复, 设置平台状态为离线, 开始重新注册 diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEvent.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEvent.java index 9c238d7d..c9369754 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEvent.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEvent.java @@ -1,10 +1,14 @@ package com.genersoft.iot.vmp.gb28181.event.platformNotRegister; -import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import org.springframework.context.ApplicationEvent; public class PlatformNotRegisterEvent extends ApplicationEvent { + /** + * Add default serial version ID + */ + private static final long serialVersionUID = 1L; + private String platformGbID; public PlatformNotRegisterEvent(Object source) { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java index 9ef66eb8..a20828d7 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java @@ -1,15 +1,11 @@ package com.genersoft.iot.vmp.gb28181.event.platformNotRegister; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; -import com.genersoft.iot.vmp.gb28181.event.online.OnlineEvent; -import com.genersoft.iot.vmp.gb28181.event.online.OnlineEventListener; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; -import com.genersoft.iot.vmp.utils.redis.RedisUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; @@ -27,11 +23,12 @@ public class PlatformNotRegisterEventLister implements ApplicationListener