package jalview.ws.jws2;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.JvSwingUtils;
private final static String JWS2HOSTURLS = "JWS2HOSTURLS";
/*
- * Singleton instance
- */
- private static Jws2Discoverer discoverer;
-
- /*
* Override for testing only
*/
private static List<String> testUrls = null;
// preferred url has precedence over others
private String preferredUrl;
- private PropertyChangeSupport changeSupport = new PropertyChangeSupport(
+ protected PropertyChangeSupport changeSupport = new PropertyChangeSupport(
this);
private Vector<String> invalidServiceUrls = null;
oldthread = Thread.currentThread();
try
{
- Class foo = getClass().getClassLoader()
+ getClass().getClassLoader()
.loadClass("compbio.ws.client.Jws2Client");
} catch (ClassNotFoundException e)
{
*/
public static Jws2Discoverer getDiscoverer()
{
- if (discoverer == null)
- {
- discoverer = new Jws2Discoverer();
- }
- return discoverer;
+ Jalview j = Jalview.getInstance();
+ return (j.j2s2discoverer == null
+ ? j.j2s2discoverer = new Jws2Discoverer()
+ : j.j2s2discoverer);
}
public boolean hasServices()