*/
package jalview.ws.jws2;
+import jalview.bin.Cache;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
+import jalview.ws.WSMenuEntryProviderI;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
+
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.net.ConnectException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.StringTokenizer;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
-import javax.swing.event.MenuEvent;
-import javax.swing.event.MenuListener;
-import org.apache.log4j.Level;
-
-import jalview.bin.Cache;
-import jalview.datamodel.AlignmentView;
-import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.gui.JalviewChangeSupport;
-import jalview.gui.JvSwingUtils;
-import jalview.util.jarInputStreamProvider;
-import jalview.ws.WSMenuEntryProviderI;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
-import compbio.data.msa.JABAService;
-import compbio.metadata.Option;
-import compbio.metadata.Preset;
-import compbio.ws.client.Jws2Client;
import compbio.ws.client.Services;
/**
{
invalidServiceUrls.removeAllElements();
}
+ if (validServiceUrls != null)
+ {
+ validServiceUrls.removeAllElements();
+ }
ArrayList<String> svctypes=new ArrayList<String>();
List<JabaWsServerQuery> qrys = new ArrayList<JabaWsServerQuery>();
// retrieve the presets and parameter set and cache now
service.getParamStore().getPresets();
service.hasParameters();
+ if (validServiceUrls==null)
+ {
+ validServiceUrls=new Vector();
+ }
+ validServiceUrls.add(jwsservers);
}
/**
return thr;
}
- Vector<String> invalidServiceUrls = null, urlsWithoutServices = null;
+ Vector<String> invalidServiceUrls = null, urlsWithoutServices = null, validServiceUrls=null;
/**
* @return the invalidServiceUrls
}
return null;
}
+
+ public int getServerStatusFor(String url)
+ {
+ if (validServiceUrls!=null && validServiceUrls.contains(url))
+ {
+ return 1;
+ }
+ if (urlsWithoutServices!=null && urlsWithoutServices.contains(url))
+ return 0;
+ if (invalidServiceUrls!=null && invalidServiceUrls.contains(url))
+ {
+ return -1;
+ }
+ return -2;
+ }
}