public void run() { Device dev = getDevice(); long leaseTime = dev.getLeaseTime(); long notifyInterval; while (isRunnable() == true) { notifyInterval = (leaseTime/4) + (long)((float)leaseTime * (Math.random() * 0.25f)); notifyInterval *= 1000; try { Thread.sleep(notifyInterval); } catch (InterruptedException e) {} dev.announce(); } } }
public void setLeaseTime(int value) { getDeviceData().setLeaseTime(value); Advertiser adv = getAdvertiser(); if (adv != null) { announce(); adv.restart(); } }
public Advertiser(Device dev) { setDevice(dev); }
Advertiser adv = new Advertiser(this); setAdvertiser(adv); adv.start();
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
Advertiser adv = new Advertiser(this); setAdvertiser(adv); adv.start();
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
public void run() { Device dev = getDevice(); long leaseTime = dev.getLeaseTime(); long notifyInterval; while (isRunnable() == true) { notifyInterval = (leaseTime/4) + (long)((float)leaseTime * (Math.random() * 0.25f)); notifyInterval *= 1000; try { Thread.sleep(notifyInterval); } catch (InterruptedException e) {} dev.announce(); } } }
Advertiser adv = new Advertiser(this); setAdvertiser(adv); adv.start();
public void setLeaseTime(int value) { getDeviceData().setLeaseTime(value); Advertiser adv = getAdvertiser(); if (adv != null) { announce(); adv.restart(); } }
public Advertiser(Device dev) { setDevice(dev); }
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
public void run() { Device dev = getDevice(); long leaseTime = dev.getLeaseTime(); long notifyInterval; while (isRunnable() == true) { notifyInterval = (leaseTime/4) + (long)((float)leaseTime * (Math.random() * 0.25f)); notifyInterval *= 1000; try { Thread.sleep(notifyInterval); } catch (InterruptedException e) {} dev.announce(); } } }
public void setLeaseTime(int value) { getDeviceData().setLeaseTime(value); Advertiser adv = getAdvertiser(); if (adv != null) { announce(); adv.restart(); } }
public Advertiser(Device dev) { setDevice(dev); }