3 import java.io.IOException;
6 import jalview.datamodel.SequenceI;
7 import jalview.ws.params.ArgumentI;
8 import jalview.ws.params.ParamDatastoreI;
9 import jalview.ws.params.WsParamSetI;
10 import jalview.ws2.operations.Operation;
13 * Provides information about the web service and sub-routines
14 * to submit, track and cancel the jobs running on the server as well as
15 * retrieve the results.
16 * The instances should not depend on any other jalview components, especially
17 * must be oblivious to the existence of any UI.
18 * They are used by other classes such as WebServiceWorkers rather than
19 * manipulate data themselves.
23 public interface WebServiceI
25 public String getHostName();
26 public String getProviderName();
27 public String getName();
28 public String getDescription();
29 public String getOperationType();
30 public List<Operation> getOperations();
31 public boolean hasParameters();
32 public ParamDatastoreI getParamStore();
34 public String submit(List<SequenceI> sequences, List<ArgumentI> args)
37 public void updateProgress(WSJob job)
40 // public <T> ResultSupplier<T> getResultSupplier(Class<T> type);
42 public void cancel(WSJob job) throws IOException;
45 * Handle an exception that happened during job submission.
46 * If the exception was handled property by this method, it
47 * returns true. Otherwise, returns false indicating the exception
48 * should be handled by the caller.
50 public boolean handleSubmissionError(WSJob job, Exception ex);
52 public boolean handleCollectionError(WSJob job, Exception ex);