Merge branch 'develop' into update_212_Dec_merge_with_21125_chamges
[jalview.git] / src / jalview / ws / jws2 / Jws2Discoverer.java
index d391f8b..56a4b77 100644 (file)
@@ -21,6 +21,7 @@
 package jalview.ws.jws2;
 
 import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.bin.ApplicationSingletonProvider;
 import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
 import jalview.gui.AlignFrame;
@@ -62,7 +63,6 @@ import compbio.ws.client.Services;
  */
 public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingletonI
 {
-
   /**
    * Returns the singleton instance of this class.
    * 
@@ -73,7 +73,6 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
     return (Jws2Discoverer) ApplicationSingletonProvider
             .getInstance(Jws2Discoverer.class);
   }
-
   public static final String COMPBIO_JABAWS = "http://www.compbio.dundee.ac.uk/jabaws";
 
   /*
@@ -88,8 +87,10 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
 
   // preferred url has precedence over others
   private String preferredUrl;
+
   
   private Set<ServiceChangeListener> serviceListeners = new CopyOnWriteArraySet<>();
+
   private Vector<String> invalidServiceUrls = null;
 
   private Vector<String> urlsWithoutServices = null;
@@ -99,6 +100,7 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
   private volatile boolean running = false;
 
   private volatile boolean aborted = false;
+
   
   private volatile Thread oldthread = null;
 
@@ -114,7 +116,6 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
   {
   }
 
-
   @Override
   public void addServiceChangeListener(ServiceChangeListener listener)
   {
@@ -166,7 +167,7 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
       {
         try
         {
-          Cache.log.debug(
+          Console.debug(
                   "Waiting around for old discovery thread to finish.");
           // wait around until old discoverer dies
           Thread.sleep(100);
@@ -175,7 +176,7 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
         }
       }
       aborted = false;
-      Cache.log.debug("Old discovery thread has finished.");
+      Console.debug("Old discovery thread has finished.");
     }
     running = true;
 
@@ -258,7 +259,7 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
       }
       if (aborted)
       {
-        Cache.log.debug(
+        Console.debug(
                 "Aborting " + qrys.size() + " JABAWS discovery threads.");
         for (JabaWsServerQuery squery : qrys)
         {
@@ -451,23 +452,23 @@ public class Jws2Discoverer implements WSDiscovererI, Runnable, ApplicationSingl
           }
           else
           {
-            Cache.log.warn("Ignoring duplicate url " + url + " in "
+            Console.warn("Ignoring duplicate url " + url + " in "
                     + JWS2HOSTURLS + " list");
           }
         } catch (MalformedURLException ex)
         {
-          Cache.log.warn("Problem whilst trying to make a URL from '"
+          Console.warn("Problem whilst trying to make a URL from '"
                   + ((url != null) ? url : "<null>") + "'");
-          Cache.log.warn(
+          Console.warn(
                   "This was probably due to a malformed comma separated list"
                           + " in the " + JWS2HOSTURLS
                           + " entry of $(HOME)/.jalview_properties)");
-          Cache.log.debug("Exception was ", ex);
+          Console.debug("Exception was ", ex);
         }
       }
     } catch (Exception ex)
     {
-      Cache.log.warn("Error parsing comma separated list of urls in "
+      Console.warn("Error parsing comma separated list of urls in "
               + JWS2HOSTURLS + " preference.", ex);
     }
     return urls;