更新配置
This commit is contained in:
parent
9cd9ebd060
commit
b15115565c
@ -144,9 +144,8 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
private void processMessageCatalogList(RequestEvent evt) {
|
||||
try {
|
||||
Element rootElement = getRootElement(evt);
|
||||
String s = rootElement.toString();
|
||||
Element deviceIdElement = rootElement.element("DeviceID");
|
||||
String deviceId = deviceIdElement.getText().toString();
|
||||
String deviceId = deviceIdElement.getText();
|
||||
Element deviceListElement = rootElement.element("DeviceList");
|
||||
if (deviceListElement == null) {
|
||||
return;
|
||||
@ -164,9 +163,9 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
if (channelDeviceElement == null) {
|
||||
continue;
|
||||
}
|
||||
String channelDeviceId = channelDeviceElement.getText().toString();
|
||||
String channelDeviceId = channelDeviceElement.getText();
|
||||
Element channdelNameElement = itemDevice.element("Name");
|
||||
String channelName = channdelNameElement != null ? channdelNameElement.getText().toString() : "";
|
||||
String channelName = channdelNameElement != null ? channdelNameElement.getTextTrim().toString() : "";
|
||||
Element statusElement = itemDevice.element("Status");
|
||||
String status = statusElement != null ? statusElement.getText().toString() : "ON";
|
||||
DeviceChannel deviceChannel = new DeviceChannel();
|
||||
@ -213,7 +212,11 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
deferredResultHolder.invokeResult(msg);
|
||||
|
||||
// 回复200
|
||||
responseAck(evt);
|
||||
if (offLineDetector.isOnline(deviceId)) {
|
||||
responseAck(evt);
|
||||
publisher.onlineEventPublish(deviceId, VideoManagerConstants.EVENT_ONLINE_KEEPLIVE);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (DocumentException | SipException | InvalidArgumentException | ParseException e) {
|
||||
e.printStackTrace();
|
||||
@ -359,7 +362,7 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
private Element getRootElement(RequestEvent evt) throws DocumentException {
|
||||
Request request = evt.getRequest();
|
||||
SAXReader reader = new SAXReader();
|
||||
reader.setEncoding("gbk");
|
||||
// reader.setEncoding("GB2312");
|
||||
Document xml = reader.read(new ByteArrayInputStream(request.getRawContent()));
|
||||
return xml.getRootElement();
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
spring:
|
||||
application:
|
||||
name: iot-vmp-vmanager
|
||||
# 影子数据存储方式,支持redis、jdbc
|
||||
# 影子数据存储方式,支持redis、jdbc,暂不支持mysql
|
||||
database: redis
|
||||
# 通信方式,支持kafka、http
|
||||
communicate: http
|
||||
|
Loading…
Reference in New Issue
Block a user