package jalview.ws2; import java.io.IOException; import java.util.List; import javax.print.attribute.standard.JobState; import jalview.util.MathUtils; public interface WebServiceWorkerI { long getUID(); List getJobs(); void startJobs() throws IOException; boolean pollJobs() throws IOException; WebServiceI getWebService(); default boolean isDone() { if (getJobs().size() == 0) return false; for (WSJob job : getJobs()) { if (!job.getStatus().isDone()) return false; } return true; } /* * Called by the executor when the worker transitions to the done state * either normally or exceptionally. */ void done(); }