From 69d9692f6194d1e03ec81cf87ea8f0e7a62f7173 Mon Sep 17 00:00:00 2001
From: wangyimeng <421132955@qq.com>
Date: 星期三, 16 三月 2022 15:27:12 +0800
Subject: [PATCH] 删除重复字段
---
src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
index 426e2e5..ffe477f 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -1,12 +1,11 @@
package com.genersoft.iot.vmp.gb28181.event;
-import com.genersoft.iot.vmp.gb28181.bean.Device;
-import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
-import com.genersoft.iot.vmp.gb28181.bean.GbStream;
+import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.event.offline.OfflineEvent;
import com.genersoft.iot.vmp.gb28181.event.platformKeepaliveExpire.PlatformKeepaliveExpireEvent;
import com.genersoft.iot.vmp.gb28181.event.platformNotRegister.PlatformCycleRegisterEvent;
import com.genersoft.iot.vmp.gb28181.event.platformNotRegister.PlatformNotRegisterEvent;
+import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEvent;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.media.zlm.event.ZLMOfflineEvent;
import com.genersoft.iot.vmp.media.zlm.event.ZLMOnlineEvent;
@@ -15,7 +14,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
-import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEvent;
import com.genersoft.iot.vmp.gb28181.event.online.OnlineEvent;
@@ -35,12 +33,20 @@
@Autowired
private ApplicationEventPublisher applicationEventPublisher;
+ public void onlineEventPublish(Device device, String from, int expires) {
+ OnlineEvent onEvent = new OnlineEvent(this);
+ onEvent.setDevice(device);
+ onEvent.setFrom(from);
+ onEvent.setExpires(expires);
+ applicationEventPublisher.publishEvent(onEvent);
+ }
+
public void onlineEventPublish(Device device, String from) {
OnlineEvent onEvent = new OnlineEvent(this);
onEvent.setDevice(device);
onEvent.setFrom(from);
- applicationEventPublisher.publishEvent(onEvent);
- }
+ applicationEventPublisher.publishEvent(onEvent);
+ }
public void outlineEventPublish(String deviceId, String from){
OfflineEvent outEvent = new OfflineEvent(this);
@@ -101,14 +107,20 @@
applicationEventPublisher.publishEvent(outEvent);
}
- @Async
+
public void catalogEventPublish(String platformId, DeviceChannel deviceChannel, String type) {
List<DeviceChannel> deviceChannelList = new ArrayList<>();
deviceChannelList.add(deviceChannel);
catalogEventPublish(platformId, deviceChannelList, type);
}
- @Async
+
+ /**
+ *
+ * @param platformId
+ * @param deviceChannels
+ * @param type
+ */
public void catalogEventPublish(String platformId, List<DeviceChannel> deviceChannels, String type) {
CatalogEvent outEvent = new CatalogEvent(this);
List<DeviceChannel> channels = new ArrayList<>();
@@ -130,7 +142,7 @@
applicationEventPublisher.publishEvent(outEvent);
}
- @Async
+
public void catalogEventPublishForStream(String platformId, List<GbStream> gbStreams, String type) {
CatalogEvent outEvent = new CatalogEvent(this);
outEvent.setGbStreams(gbStreams);
@@ -139,10 +151,17 @@
applicationEventPublisher.publishEvent(outEvent);
}
- @Async
+
public void catalogEventPublishForStream(String platformId, GbStream gbStream, String type) {
List<GbStream> gbStreamList = new ArrayList<>();
gbStreamList.add(gbStream);
catalogEventPublishForStream(platformId, gbStreamList, type);
}
+
+ public void recordEndEventPush(RecordInfo recordInfo) {
+ RecordEndEvent outEvent = new RecordEndEvent(this);
+ outEvent.setRecordInfo(recordInfo);
+ applicationEventPublisher.publishEvent(outEvent);
+ }
+
}
--
Gitblit v1.8.0