@Stop public void stopJmdnsGroup() { alive = false; thread.interrupt(); for (JmDnsComponent _jmdns : jmdns) { _jmdns.close(); } jmdns = null; super.stopRestGroup(); }
@Override public void run() { ArrayList<InetAddress> ips = getIps(); ContainerRoot model = getModelService().getLastModel(); // update local address interfaces for (InetAddress ip : ips) { KevoreePlatformHelper.instance$.updateNodeLinkProp( model, this.getNodeName(), this.getNodeName(), org.kevoree.framework.Constants.instance$.getKEVOREE_PLATFORM_REMOTE_NODE_IP(), ip.getHostAddress(), "LAN" + ip.getHostName(), 100); // // KevoreePlatformHelper.updateNodeLinkProp(model,this.getNodeName(),this.getNodeName(), // org.kevoree.framework.Constants.KEVOREE_MODEL_PORT(),this.getDictionary().get("port").toString(), "LAN", 100); } getModelService().updateModel(model); for (InetAddress ip : ips) { jmdns.add( new JmDnsComponent( this.getNodeName(), this.getName(), Integer.parseInt(this.getDictionary().get("port").toString()), this.getModelService(), "JmDNSNanoRestGroup", ip)); } while (alive) { for (JmDnsComponent _jmdns : jmdns) { _jmdns.requestUpdateList(timer); } try { Thread.sleep(timer); } catch (InterruptedException e) { logger.debug("requestUpdateList: " + e.getMessage()); } } }