1 /* Copyright (c) 2011 Peter Troshin
\r
3 * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0
\r
5 * This library is free software; you can redistribute it and/or modify it under the terms of the
\r
6 * Apache License version 2 as published by the Apache Software Foundation
\r
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
\r
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
\r
10 * License for more details.
\r
12 * A copy of the license is in apache_license.txt. It is also available here:
\r
13 * @see: http://www.apache.org/licenses/LICENSE-2.0.txt
\r
15 * Any republication or derived work distributed in source code form
\r
16 * must include this copyright and license notice.
\r
18 package compbio.data.msa;
\r
20 import java.security.InvalidParameterException;
\r
22 import javax.jws.WebParam;
\r
24 import compbio.metadata.ChunkHolder;
\r
25 import compbio.metadata.JobStatus;
\r
27 public interface JManagement {
\r
30 * Stop running the job <code>jobId</code> but leave its output untouched
\r
32 * @return true if job was cancelled successfully, false otherwise
\r
33 * @throws InvalidParameterException
\r
34 * is thrown if jobId is empty or cannot be recognised e.g. in
\r
37 boolean cancelJob(@WebParam(name = "jobId") String jobId);
\r
40 * Return the status of the job.
\r
43 * - unique job identifier
\r
44 * @return JobStatus - status of the job
\r
45 * @throws InvalidParameterException
\r
46 * is thrown if jobId is empty or cannot be recognised e.g. in
\r
50 JobStatus getJobStatus(@WebParam(name = "jobId") String jobId);
\r
53 * Reads 1kb chunk from the statistics file which is specific to a given web
\r
54 * service from the <code>position</code>. If in time of a request less then
\r
55 * 1kb data is available from the position to the end of the file, then it
\r
56 * returns all the data available from the position to the end of the file.
\r
59 * - unique job identifier
\r
61 * - next position within the file to read
\r
62 * @return ChunkHolder - which contains a chunk of data and a next position
\r
63 * within the file from which no data has been read
\r
64 * @throws InvalidParameterException
\r
65 * thrown if jobId is empty or cannot be recognised e.g. in
\r
66 * invalid format and also if the position value is negative
\r
69 ChunkHolder pullExecStatistics(@WebParam(name = "jobId") String jobId,
\r
70 @WebParam(name = "position") long position);
\r