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;
9 import jalview.ws2.api.WebServiceJob;
11 public interface WebServiceClientI
14 * Get the hostname/url of the remote server which is supplying the service.
21 * Get the name of the web service client.
25 String getClientName();
28 * Submit new job to the service with the supplied input sequences and
29 * arguments. Optionally, some services may require additional credentials to
30 * run. Implementations should perform all data serialization necessary for
31 * the job submission, start a new job on the remote server and return a
32 * handler for that job.
37 * user provided arguments
39 * optional user credentials needed to run the job
42 * submission failed due to a connection error
44 WebServiceJob submit(List<SequenceI> sequences, List<ArgumentI> args,
45 Credentials credentials) throws IOException;
48 * Poll the server and update the progress of the running job accordingly.
49 * Implementations should fetch the current job status from the server and
50 * update the status and log strings on the provided job object.
55 * server error occurred
57 void updateProgress(WebServiceJob job) throws IOException;
60 * Send the cancellation request to the server for the specified job.
65 * server error occurred
66 * @throws UnsupportedOperationException
67 * server does not support job cancellation
69 void cancel(WebServiceJob job) throws IOException, UnsupportedOperationException;