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 getName();
27 public String getDescription();
28 public String getOperationType();
29 public List<Operation> getOperations();
30 public boolean hasParameters();
31 public ParamDatastoreI getParamStore();
33 public WSJob submit(List<SequenceI> sequences, List<ArgumentI> args)
36 public void updateProgress(WSJob job)
39 // public <T> ResultSupplier<T> getResultSupplier(Class<T> type);
41 public void cancel(WSJob job) throws IOException;
44 * Handle an exception that happened during job submission.
45 * If the exception was handled property by this method, it
46 * returns true. Otherwise, returns false indicating the exception
47 * should be handled by the caller.
49 public boolean handleSubmissionError(WSJob job, Exception ex);
51 public boolean handleCollectionError(WSJob job, Exception ex);