1 package jalview.ws2.api;
5 /** Job has invalid inputs and cannot be started. */
7 /** Job is created and ready for submission. */
9 /** Job has been submitted and awaits processing. */
11 /** Job has been queued for execution */
15 /** Job has completed successfully. */
17 /** Job has finished with errors. */
19 /** Job has been cancelled by the user. */
21 /** Job cannot be processed due to server error. */
23 /** Job status cannot be determined. */
27 * Returns true if the status corresponds to the job completed due to normal
28 * termination, error or cancellation.
30 * @return {@value true} if status corresponds to a finished job.
32 public boolean isDone()
49 throw new AssertionError("non-exhaustive switch statement");
54 * A precedence order of job statuses used to compute the overall task status.
56 public static final JobStatus[] statusPrecedence = {
57 JobStatus.INVALID, // all must be invalid for task to be invalid
58 JobStatus.COMPLETED, // all but invalid must be completed for task to be
60 JobStatus.UNKNOWN, // unknown prevents successful completion but not
66 JobStatus.CANCELLED, // if any is terminated unsuccessfully, the task is
69 JobStatus.SERVER_ERROR