From 619a66f9998fa646a69903a4c22e2bbf92e2221b Mon Sep 17 00:00:00 2001
From: lawrencehj <1934378145@qq.com>
Date: 星期三, 28 七月 2021 09:49:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'upstream/wvp-28181-2.0' into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 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 50f6bc0..0422962 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,5 +1,8 @@
package com.genersoft.iot.vmp.gb28181.event;
+import com.genersoft.iot.vmp.gb28181.bean.Device;
+import com.genersoft.iot.vmp.gb28181.event.platformKeepaliveExpire.PlatformKeepaliveExpireEvent;
+import com.genersoft.iot.vmp.gb28181.event.platformNotRegister.PlatformNotRegisterEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
@@ -20,9 +23,9 @@
@Autowired
private ApplicationEventPublisher applicationEventPublisher;
- public void onlineEventPublish(String deviceId, String from) {
+ public void onlineEventPublish(Device device, String from) {
OnlineEvent onEvent = new OnlineEvent(this);
- onEvent.setDeviceId(deviceId);
+ onEvent.setDevice(device);
onEvent.setFrom(from);
applicationEventPublisher.publishEvent(onEvent);
}
@@ -33,6 +36,26 @@
outEvent.setFrom(from);
applicationEventPublisher.publishEvent(outEvent);
}
+
+ /**
+ * 骞冲彴蹇冭烦鍒版湡浜嬩欢
+ * @param platformGbId
+ */
+ public void platformKeepaliveExpireEventPublish(String platformGbId){
+ PlatformKeepaliveExpireEvent platformNotRegisterEvent = new PlatformKeepaliveExpireEvent(this);
+ platformNotRegisterEvent.setPlatformGbID(platformGbId);
+ applicationEventPublisher.publishEvent(platformNotRegisterEvent);
+ }
+
+ /**
+ * 骞冲彴鏈敞鍐屼簨浠�
+ * @param platformGbId
+ */
+ public void platformNotRegisterEventPublish(String platformGbId){
+ PlatformNotRegisterEvent platformNotRegisterEvent = new PlatformNotRegisterEvent(this);
+ platformNotRegisterEvent.setPlatformGbID(platformGbId);
+ applicationEventPublisher.publishEvent(platformNotRegisterEvent);
+ }
/**
* 璁惧鎶ヨ浜嬩欢
@@ -43,4 +66,5 @@
alarmEvent.setAlarmInfo(deviceAlarm);
applicationEventPublisher.publishEvent(alarmEvent);
}
+
}
--
Gitblit v1.8.0