1 package compbio.data.msa;
\r
3 import java.security.InvalidParameterException;
\r
5 import javax.jws.WebParam;
\r
7 import compbio.metadata.ChunkHolder;
\r
8 import compbio.metadata.JobStatus;
\r
10 public interface JManagement {
\r
13 * Stop running job but leave its output untouched
\r
15 * @return true if job was cancelled successfully, false otherwise
\r
16 * @throws InvalidParameterException
\r
17 * thrown if jobId is empty or cannot be recognised e.g. in
\r
20 boolean cancelJob(@WebParam(name = "jobId") String jobId);
\r
23 * Return the status of the job. @see JobStatus
\r
26 * - unique job identifier
\r
27 * @return JobStatus - status of the job
\r
28 * @throws InvalidParameterException
\r
29 * thrown if jobId is empty or cannot be recognised e.g. in
\r
32 JobStatus getJobStatus(@WebParam(name = "jobId") String jobId);
\r
35 * Reads 1kb chunk from the statistics file which is specific to a given web
\r
36 * service from the position. If in time of a request less then 1kb data is
\r
37 * available from the position to the end of the file, then it returns all
\r
38 * the data available from the position to the end of the file.
\r
41 * - unique job identifier
\r
43 * - next position within the file to read
\r
44 * @return ChunkHolder - @see ChunkHolder which contains a chuink of data
\r
45 * and a next position within the file from which no data has been
\r
47 * @throws InvalidParameterException
\r
48 * thrown if jobId is empty or cannot be recognised e.g. in
\r
49 * invalid format and also if the position value is negative
\r
51 ChunkHolder pullExecStatistics(@WebParam(name = "jobId") String jobId,
\r
52 @WebParam(name = "position") long position);
\r