import jalview.bin.Cache;
import jalview.util.ArrayUtils;
+import jalview.util.MathUtils;
import jalview.ws.params.ArgumentI;
import jalview.ws2.actions.api.TaskEventListener;
import jalview.ws2.actions.api.TaskI;
*/
public abstract class AbstractPollableTask<T extends BaseJob, R> implements TaskI<R>
{
+ private final long uid = MathUtils.getUID();
+
protected final WebServiceClientI client;
protected final List<ArgumentI> args;
this.eventHandler = new TaskEventSupport<R>(this, eventListener);
}
+ public long getUid()
+ {
+ return uid;
+ }
+
/**
* Start the task using provided scheduled executor service. It creates a
* polling loop running at set intervals.
import java.util.List;
-import jalview.viewmodel.AlignmentViewport;
import jalview.ws2.api.JobStatus;
-import jalview.ws2.api.WebServiceJobHandle;
/**
* {@code TaskI} objects represent running services. Tasks are created by
public interface TaskI<T>
{
/**
+ * Get the universal identifier of this task.
+ *
+ * @return identifier
+ */
+ long getUid();
+
+ /**
* Get the current status of the task. The resultant status should be a
* combination of individual sub-job statuses.
*