JAL-3070 remove final reference to Jws2Instance
[jalview.git] / src / jalview / ws / jws2 / Jws2Discoverer.java
index b6c5473..e4ff459 100644 (file)
@@ -281,7 +281,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         for (Jws2Instance svc : services)
         {
           svcs[ipos] = svc;
-          spos[ipos++] = 1000 * svcUrls.indexOf(svc.getHost()) + 1
+          spos[ipos++] = 1000 * svcUrls.indexOf(svc.getHostURL()) + 1
                   + svctypes.indexOf(svc.getName());
         }
         jalview.util.QuickSort.sort(spos, svcs);
@@ -418,7 +418,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         // previous service of this type already present
         atpoint.addSeparator();
       }
-      atpoint.add(hitm = new JMenuItem(service.getHost()));
+      atpoint.add(hitm = new JMenuItem(service.getHostURL()));
       hitm.setForeground(Color.blue);
       hitm.addActionListener(new ActionListener()
       {
@@ -426,7 +426,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         @Override
         public void actionPerformed(ActionEvent e)
         {
-          Desktop.showUrl(service.getHost());
+          Desktop.showUrl(service.getHostURL());
         }
       });
       hitm.setToolTipText(JvSwingUtils.wrapTooltip(false,
@@ -442,7 +442,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         for (final Jws2Instance sv : alternates.get(service.getName()))
         {
           JMenuItem itm;
-          hitm.add(itm = new JMenuItem(sv.getHost()));
+          hitm.add(itm = new JMenuItem(sv.getHostURL()));
           itm.setForeground(Color.blue);
           itm.addActionListener(new ActionListener()
           {
@@ -491,12 +491,13 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     ArrayList<String> hostlist = new ArrayList<>();
     for (Jws2Instance service : enumerableServices)
     {
-      ArrayList<Jws2Instance> hostservices = hosts.get(service.getHost());
+      ArrayList<Jws2Instance> hostservices = hosts
+              .get(service.getHostURL());
       if (hostservices == null)
       {
-        hosts.put(service.getHost(),
+        hosts.put(service.getHostURL(),
                 hostservices = new ArrayList<>());
-        hostlist.add(service.getHost());
+        hostlist.add(service.getHostURL());
       }
       hostservices.add(service);
     }
@@ -563,7 +564,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
               @Override
               public void actionPerformed(ActionEvent e)
               {
-                Desktop.showUrl(service.getHost());
+                Desktop.showUrl(service.getHostURL());
               }
             });
             hitm.setToolTipText(
@@ -606,7 +607,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
                   for (Jws2Instance instance : getDiscoverer().services)
                   {
                     System.out.println("Service " + i++ + " "
-                            + instance.getClass() + "@" + instance.getHost()
+                            + instance.getClass() + "@"
+                            + instance.getHostURL()
                             + ": " + instance.getActionText());
                   }
 
@@ -1016,7 +1018,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     {
       if (svc.getName().equals(serviceName))
       {
-        if (serviceurl == null || serviceurl.equals(svc.getHost()))
+        if (serviceurl == null || serviceurl.equals(svc.getHostURL()))
         {
           response = svc;
           break;
@@ -1041,8 +1043,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       prefmap = new HashMap<>();
       preferredServiceMap.put(afid, prefmap);
     }
-    prefmap.put(serviceName, selectedServer.getHost());
-    prefmap.put(serviceAction, selectedServer.getHost());
+    prefmap.put(serviceName, selectedServer.getHostURL());
+    prefmap.put(serviceAction, selectedServer.getHostURL());
   }
 
   public void setPreferredServiceFor(String serviceType,