| | |
| | | String channelId = getText(rootElement, "DeviceID"); |
| | | // 远程启动功能 |
| | | if (!ObjectUtils.isEmpty(getText(rootElement, "TeleBoot"))) { |
| | | if (parentPlatform.getServerGBId().equals(targetGBId)) { |
| | | // 远程启动本平台:需要在重新启动程序后先对SipStack解绑 |
| | | logger.info("执行远程启动本平台命令"); |
| | | try { |
| | | cmderFroPlatform.unregister(parentPlatform, null, null); |
| | | } catch (InvalidArgumentException | ParseException | SipException e) { |
| | | logger.error("[命令发送失败] 国标级联 注销: {}", e.getMessage()); |
| | | } |
| | | taskExecutor.execute(() -> { |
| | | // 远程启动 |
| | | // try { |
| | | // Thread.sleep(3000); |
| | | // SipProvider up = (SipProvider) SpringBeanFactory.getBean("udpSipProvider"); |
| | | // SipStackImpl stack = (SipStackImpl)up.getSipStack(); |
| | | // stack.stop(); |
| | | // Iterator listener = stack.getListeningPoints(); |
| | | // while (listener.hasNext()) { |
| | | // stack.deleteListeningPoint((ListeningPoint) listener.next()); |
| | | // } |
| | | // Iterator providers = stack.getSipProviders(); |
| | | // while (providers.hasNext()) { |
| | | // stack.deleteSipProvider((SipProvider) providers.next()); |
| | | // } |
| | | // VManageBootstrap.restart(); |
| | | // } catch (InterruptedException | ObjectInUseException e) { |
| | | // logger.error("[任务执行失败] 服务重启: {}", e.getMessage()); |
| | | // } |
| | | }); |
| | | } |
| | | // TODO 拒绝远程启动命令 |
| | | logger.warn("[国标级联]收到平台的远程启动命令, 不处理"); |
| | | |
| | | // if (parentPlatform.getServerGBId().equals(targetGBId)) { |
| | | // // 远程启动本平台:需要在重新启动程序后先对SipStack解绑 |
| | | // logger.info("执行远程启动本平台命令"); |
| | | // try { |
| | | // cmderFroPlatform.unregister(parentPlatform, null, null); |
| | | // } catch (InvalidArgumentException | ParseException | SipException e) { |
| | | // logger.error("[命令发送失败] 国标级联 注销: {}", e.getMessage()); |
| | | // } |
| | | // taskExecutor.execute(() -> { |
| | | // // 远程启动 |
| | | //// try { |
| | | //// Thread.sleep(3000); |
| | | //// SipProvider up = (SipProvider) SpringBeanFactory.getBean("udpSipProvider"); |
| | | //// SipStackImpl stack = (SipStackImpl)up.getSipStack(); |
| | | //// stack.stop(); |
| | | //// Iterator listener = stack.getListeningPoints(); |
| | | //// while (listener.hasNext()) { |
| | | //// stack.deleteListeningPoint((ListeningPoint) listener.next()); |
| | | //// } |
| | | //// Iterator providers = stack.getSipProviders(); |
| | | //// while (providers.hasNext()) { |
| | | //// stack.deleteSipProvider((SipProvider) providers.next()); |
| | | //// } |
| | | //// VManageBootstrap.restart(); |
| | | //// } catch (InterruptedException | ObjectInUseException e) { |
| | | //// logger.error("[任务执行失败] 服务重启: {}", e.getMessage()); |
| | | //// } |
| | | // }); |
| | | // } |
| | | } |
| | | DeviceControlType deviceControlType = DeviceControlType.typeOf(rootElement); |
| | | logger.info("[接受deviceControl命令] 命令: {}", deviceControlType); |