1 package jalview.ws2.client.api;
3 import java.io.IOException;
6 import jalview.datamodel.SequenceI;
7 import jalview.ws.params.ArgumentI;
8 import jalview.ws2.api.Credentials;
10 public interface WebServiceClientI
13 * Get the hostname/url of the remote server which is supplying the service.
20 * Get the name of the web service client.
24 String getClientName();
27 * Submit new job to the service with the supplied input sequences and
28 * arguments. Optionally, some services may require additional credentials to
29 * run. Implementations should perform all data serialization necessary for
30 * the job submission, start a new job on the remote server and return a
31 * handler for that job.
36 * user provided arguments
38 * optional user credentials needed to run the job
41 * submission failed due to a connection error
43 WebServiceJob submit(List<SequenceI> sequences, List<ArgumentI> args,
44 Credentials credentials) throws IOException;
47 * Poll the server and update the progress of the running job accordingly.
48 * Implementations should fetch the current job status from the server and
49 * update the status and log strings on the provided job object.
54 * server error occurred
56 void updateProgress(WebServiceJob job) throws IOException;
59 * Send the cancellation request to the server for the specified job.
64 * server error occurred
65 * @throws UnsupportedOperationException
66 * server does not support job cancellation
68 void cancel(WebServiceJob job) throws IOException, UnsupportedOperationException;