优化架构,获取设备注册时的设备相关信息
This commit is contained in:
91
src/main/java/com/genersoft/iot/vmp/jt1078/event/RegisterEvent.java
Executable file
91
src/main/java/com/genersoft/iot/vmp/jt1078/event/RegisterEvent.java
Executable file
@@ -0,0 +1,91 @@
|
||||
package com.genersoft.iot.vmp.jt1078.event;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
/**
|
||||
* 注册事件
|
||||
*/
|
||||
|
||||
public class RegisterEvent extends ApplicationEvent {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public RegisterEvent(Object source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
|
||||
private int provinceId;
|
||||
|
||||
private int cityId;
|
||||
|
||||
private String makerId;
|
||||
|
||||
private String deviceModel;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
private int plateColor;
|
||||
|
||||
private String plateNo;
|
||||
|
||||
|
||||
public int getProvinceId() {
|
||||
return provinceId;
|
||||
}
|
||||
|
||||
public void setProvinceId(int provinceId) {
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public int getCityId() {
|
||||
return cityId;
|
||||
}
|
||||
|
||||
public void setCityId(int cityId) {
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public String getMakerId() {
|
||||
return makerId;
|
||||
}
|
||||
|
||||
public void setMakerId(String makerId) {
|
||||
this.makerId = makerId;
|
||||
}
|
||||
|
||||
public String getDeviceModel() {
|
||||
return deviceModel;
|
||||
}
|
||||
|
||||
public void setDeviceModel(String deviceModel) {
|
||||
this.deviceModel = deviceModel;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public int getPlateColor() {
|
||||
return plateColor;
|
||||
}
|
||||
|
||||
public void setPlateColor(int plateColor) {
|
||||
this.plateColor = plateColor;
|
||||
}
|
||||
|
||||
public String getPlateNo() {
|
||||
return plateNo;
|
||||
}
|
||||
|
||||
public void setPlateNo(String plateNo) {
|
||||
this.plateNo = plateNo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.genersoft.iot.vmp.jt1078.event.eventListener;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEvent;
|
||||
import com.genersoft.iot.vmp.jt1078.event.RegisterEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class RegisterEventListener implements ApplicationListener<RegisterEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(RegisterEvent event) {
|
||||
System.out.println("收到设备注册: "+ event.getDeviceId());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user