panlinlin
2021-01-07 9bf87971e7dc6e0bccc0cf9a2301e9c89f9a0ba6
src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -1,5 +1,7 @@
package com.genersoft.iot.vmp.gb28181.event;
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;
@@ -9,7 +11,7 @@
/**    
 * @Description:Event事件通知推送器,支持推送在线事件、离线事件
 * @author: songww
 * @author: swwheihei
 * @date:   2020年5月6日 上午11:30:50     
 */
@Component
@@ -31,4 +33,24 @@
      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);
    }
}