增加对水星IPC的兼容
增加对SIP错误的订阅,刷新通道或点播或回放出现sip错误时及时返回给页面 优化UI,增加按钮loading
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.genersoft.iot.vmp.gb28181.event;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.sip.ResponseEvent;
|
||||
import javax.sip.message.Request;
|
||||
import java.util.EventObject;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Component
|
||||
public class SipSubscribe {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(SipSubscribe.class);
|
||||
|
||||
private Map<String, SipSubscribe.Event> allSubscribes = new ConcurrentHashMap<>();
|
||||
|
||||
public interface Event {
|
||||
void response(ResponseEvent event);
|
||||
}
|
||||
|
||||
public void addSubscribe(String key, SipSubscribe.Event event) {
|
||||
allSubscribes.put(key, event);
|
||||
}
|
||||
|
||||
public SipSubscribe.Event getSubscribe(String key) {
|
||||
return allSubscribes.get(key);
|
||||
}
|
||||
|
||||
public int getSize(){
|
||||
return allSubscribes.size();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user