X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Discoverer.java;h=ca36a51d7e1622d6da59abceebd8a3ac58277d9b;hb=0d9e7c05b15bfd0ac59436066e2fe805673bbef0;hp=516a7190aa3d7329737b7493b3e8e49b8cb429cc;hpb=0424fec4a6d71684f56978f61eadd4ceb0652a60;p=jalview.git diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index 516a719..ca36a51 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -21,6 +21,7 @@ package jalview.ws.jws2; import jalview.bin.Cache; +import jalview.bin.Console; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.JvSwingUtils; @@ -164,7 +165,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI { try { - Cache.log.debug( + Console.debug( "Waiting around for old discovery thread to finish."); // wait around until old discoverer dies Thread.sleep(100); @@ -173,7 +174,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI } } aborted = false; - Cache.log.debug("Old discovery thread has finished."); + Console.debug("Old discovery thread has finished."); } running = true; @@ -194,7 +195,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI .loadClass("compbio.ws.client.Jws2Client"); } catch (ClassNotFoundException e) { - System.err.println( + jalview.bin.Console.errPrintln( "Not enabling JABA Webservices : client jar is not available." + "\nPlease check that your webstart JNLP file is up to date!"); running = false; @@ -258,7 +259,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI } if (aborted) { - Cache.log.debug( + Console.debug( "Aborting " + qrys.size() + " JABAWS discovery threads."); for (JabaWsServerQuery squery : qrys) { @@ -313,7 +314,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI { services = new Vector<>(); } - System.out.println( + jalview.bin.Console.outPrintln( "Discovered service: " + jwsservers + " " + service.toString()); // Jws2Instance service = new Jws2Instance(jwsservers, srv.toString(), // service2); @@ -491,8 +492,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI ArrayList hostservices = hosts.get(service.getHost()); if (hostservices == null) { - hosts.put(service.getHost(), - hostservices = new ArrayList<>()); + hosts.put(service.getHost(), hostservices = new ArrayList<>()); hostlist.add(service.getHost()); } hostservices.add(service); @@ -600,12 +600,12 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI { if (getDiscoverer().services != null) { - System.out.println("Changesupport: There are now " + jalview.bin.Console.outPrintln("Changesupport: There are now " + getDiscoverer().services.size() + " services"); int i = 1; for (Jws2Instance instance : getDiscoverer().services) { - System.out.println("Service " + i++ + " " + jalview.bin.Console.outPrintln("Service " + i++ + " " + instance.getClass() + "@" + instance.getHost() + ": " + instance.getActionText()); } @@ -711,23 +711,23 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI } 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 : "") + "'"); - 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; @@ -735,8 +735,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI public Vector getServices() { - return (services == null) ? new Vector<>() - : new Vector<>(services); + return (services == null) ? new Vector<>() : new Vector<>(services); } /**