| | |
| | |
|
| | | @Override
|
| | | public void onApplicationEvent(OnlineEvent event) {
|
| | | |
| | | if (logger.isDebugEnabled()) {
|
| | | logger.debug("设备上线事件触发,deviceId:" + event.getDevice().getDeviceId() + ",from:" + event.getFrom());
|
| | | }
|
| | |
|
| | | logger.info("设备上线事件触发,deviceId:" + event.getDevice().getDeviceId() + ",from:" + event.getFrom());
|
| | | Device device = event.getDevice();
|
| | | if (device == null) return;
|
| | | String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetting.getServerId() + "_" + event.getDevice().getDeviceId();
|
| | |
| | | storager.updateDevice(device);
|
| | | // 上线添加订阅
|
| | | if (device.getSubscribeCycleForCatalog() > 0) {
|
| | | // 查询在线设备那些开启了订阅,为设备开启定时的目录订阅
|
| | | deviceService.addCatalogSubscribe(device);
|
| | | }
|
| | | if (device.getSubscribeCycleForMobilePosition() > 0) {
|
| | | deviceService.addMobilePositionSubscribe(device);
|
| | | }
|
| | | }
|