From: Mateusz Warowny Date: Wed, 9 Mar 2022 18:18:01 +0000 (+0100) Subject: JAL-3878 Add WebServiceProviderI - a view of services. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8b5365ba308174caf87feaea2e7f21bbc9c6e971;p=jalview.git JAL-3878 Add WebServiceProviderI - a view of services. --- diff --git a/src/jalview/ws2/client/api/WebServiceDiscovererI.java b/src/jalview/ws2/client/api/WebServiceDiscovererI.java index 38fabdf..951c86f 100644 --- a/src/jalview/ws2/client/api/WebServiceDiscovererI.java +++ b/src/jalview/ws2/client/api/WebServiceDiscovererI.java @@ -10,11 +10,11 @@ import jalview.ws2.api.WebService; /** * 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; @@ -52,13 +52,6 @@ public interface WebServiceDiscovererI int getStatusForUrl(URL url); /** - * Get the list of services found on the servers. - * - * @return services - */ - List getServices(); - - /** * @return {@value true} if there are services available */ boolean hasServices(); diff --git a/src/jalview/ws2/client/api/WebServiceProviderI.java b/src/jalview/ws2/client/api/WebServiceProviderI.java new file mode 100644 index 0000000..7e054f8 --- /dev/null +++ b/src/jalview/ws2/client/api/WebServiceProviderI.java @@ -0,0 +1,29 @@ +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> getServices(); + + /** + * Retrieve services by their action type. + * + * @param type + * action type + * @return list of services + */ + public > List> getServices(Class type); +}