package jalview.ws2; import java.io.IOException; import java.util.List; import jalview.datamodel.SequenceI; import jalview.ws.params.ArgumentI; import jalview.ws.params.ParamDatastoreI; import jalview.ws.params.WsParamSetI; import jalview.ws2.operations.Operation; /** * Provides information about the web service and sub-routines * to submit, track and cancel the jobs running on the server as well as * retrieve the results. * The instances should not depend on any other jalview components, especially * must be oblivious to the existence of any UI. * They are used by other classes such as WebServiceWorkers rather than * manipulate data themselves. * * @author mmwarowny */ public interface WebServiceI { public String getHostName(); public String getName(); public String getDescription(); public String getOperationType(); public List getOperations(); public boolean hasParameters(); public ParamDatastoreI getParamStore(); public WSJob submit(List sequences, List args) throws IOException; public void updateProgress(WSJob job) throws IOException; // public ResultSupplier getResultSupplier(Class type); public void cancel(WSJob job) throws IOException; /** * Handle an exception that happened during job submission. * If the exception was handled property by this method, it * returns true. Otherwise, returns false indicating the exception * should be handled by the caller. */ public boolean handleSubmissionError(WSJob job, Exception ex); public boolean handleCollectionError(WSJob job, Exception ex); }