增加redis通知方式向设备/平台发送报警消息功能
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.genersoft.iot.vmp.conf;
|
||||
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.service.impl.RedisAlarmMsgListener;
|
||||
import com.genersoft.iot.vmp.service.impl.RedisGPSMsgListener;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -48,6 +49,9 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
@Autowired
|
||||
private RedisGPSMsgListener redisGPSMsgListener;
|
||||
|
||||
@Autowired
|
||||
private RedisAlarmMsgListener redisAlarmMsgListener;
|
||||
|
||||
@Bean
|
||||
public JedisPool jedisPool() {
|
||||
if (StringUtils.isBlank(password)) {
|
||||
@@ -93,6 +97,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
RedisMessageListenerContainer container = new RedisMessageListenerContainer();
|
||||
container.setConnectionFactory(connectionFactory);
|
||||
container.addMessageListener(redisGPSMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_GPS));
|
||||
container.addMessageListener(redisAlarmMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM_RECEIVE));
|
||||
return container;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SipConfig {
|
||||
|
||||
Integer registerTimeInterval = 120;
|
||||
|
||||
private boolean alarm = false;
|
||||
private boolean alarm;
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
|
||||
Reference in New Issue
Block a user