/**
* The discoverer and supplier of web services. The discoverer is responsible
* for building and storing {@link jalview.ws2.api.WebService} objects
- * according to the data retrieved from the servers avaiable at specified urls.
+ * according to the data retrieved from the servers available at specified urls.
* @author mmwarowny
*
*/
-public interface WebServiceDiscovererI
+public interface WebServiceDiscovererI extends WebServiceProviderI
{
public static final int STATUS_OK = 1;
int getStatusForUrl(URL url);
/**
- * Get the list of services found on the servers.
- *
- * @return services
- */
- List<WebService> getServices();
-
- /**
* @return {@value true} if there are services available
*/
boolean hasServices();
--- /dev/null
+package jalview.ws2.client.api;
+
+import java.util.List;
+
+import jalview.ws2.actions.api.ActionI;
+import jalview.ws2.api.WebService;
+
+/*
+ * A view of services that allows to retrieve the services by the type
+ * of action.
+ */
+public interface WebServiceProviderI
+{
+ /**
+ * Retrieve list of all web services.
+ *
+ * @return all web services
+ */
+ public List<WebService<?>> getServices();
+
+ /**
+ * Retrieve services by their action type.
+ *
+ * @param type
+ * action type
+ * @return list of services
+ */
+ public <A extends ActionI<?>> List<WebService<A>> getServices(Class<A> type);
+}