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