use of com.connectsdk.service.config.ServiceDescription in project butter-android by butterproject.
the class SSDPDiscoveryProvider method sendSearch.
public void sendSearch() {
List<String> killKeys = new ArrayList<String>();
long killPoint = new Date().getTime() - TIMEOUT;
for (String key : foundServices.keySet()) {
ServiceDescription service = foundServices.get(key);
if (service == null || service.getLastDetection() < killPoint) {
killKeys.add(key);
}
}
for (String key : killKeys) {
final ServiceDescription service = foundServices.get(key);
if (service != null) {
notifyListenersOfLostService(service);
}
if (foundServices.containsKey(key))
foundServices.remove(key);
}
rescan();
}
Aggregations