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 the job <code>jobId</code> but leave its output untouched
\r
15 * @return true if job was cancelled successfully, false otherwise
\r
16 * @throws InvalidParameterException
\r
17 * is 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.
\r
26 * - unique job identifier
\r
27 * @return JobStatus - status of the job
\r
28 * @throws InvalidParameterException
\r
29 * is thrown if jobId is empty or cannot be recognised e.g. in
\r
33 JobStatus getJobStatus(@WebParam(name = "jobId") String jobId);
\r
36 * Reads 1kb chunk from the statistics file which is specific to a given web
\r
37 * service from the <code>position</code>. If in time of a request less then
\r
38 * 1kb data is available from the position to the end of the file, then it
\r
39 * returns all the data available from the position to the end of the file.
\r
42 * - unique job identifier
\r
44 * - next position within the file to read
\r
45 * @return ChunkHolder - which contains a chunk of data and a next position
\r
46 * within the file from which no data has been read
\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
52 ChunkHolder pullExecStatistics(@WebParam(name = "jobId") String jobId,
\r
53 @WebParam(name = "position") long position);
\r