+ if (newInstance != null)
+ break;
+ }
+ if (newInstance != null)
+ instances.add(newInstance);
+ }
+ }
+
+ services = instances;
+ Cache.log.info("Slivka services reloading finished");
+ notifyServiceListeners(instances);
+ return instances;
+ }
+
+ @Override
+ public List<ServiceWithParameters> getServices()
+ {
+ return services;
+ }
+
+ @Override
+ public boolean hasServices()
+ {
+ return !isRunning() && services.size() > 0;
+ }
+
+ @Override
+ public boolean isRunning()
+ {
+ return !discoveryTasks.stream().allMatch(Future::isDone);
+ }
+
+ @Override
+ public void setServiceUrls(List<String> wsUrls)
+ {
+ if (wsUrls != null && !wsUrls.isEmpty())
+ {
+ Cache.setProperty(SLIVKA_HOST_URLS, String.join(",", wsUrls));
+ }
+ else
+ {
+ Cache.removeProperty(SLIVKA_HOST_URLS);
+ }
+ }
+
+ @Override
+ public List<String> getServiceUrls()
+ {
+ String surls = Cache.getDefault(SLIVKA_HOST_URLS, COMPBIO_SLIVKA);
+ String[] urls = surls.split(",");
+ ArrayList<String> valid = new ArrayList<>(urls.length);
+ for (String url : urls)
+ {
+ try