1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.applications.manager;
12
13 import org.astrogrid.applications.CeaException;
14 import org.astrogrid.applications.beans.v1.cea.castor.ExecutionSummaryType;
15 import org.astrogrid.applications.beans.v1.cea.castor.MessageType;
16 import org.astrogrid.applications.beans.v1.cea.castor.ResultListType;
17
18 import java.net.URI;
19
20 /*** Defines a component used to query status of applications, access results, etc.
21 * @author Noel Winstanley nw@jb.man.ac.uk 16-Jun-2004
22 *
23 */
24 public interface QueryService {
25 /*** register a remote progress listener with an application
26 *
27 * @param executionId the server-assigned id of a current application (which may either be running, or waiting to run)
28 * @param endpoint endpoint of a webservice implementing the {@link org.astrogrid.jes.delegate.v1.jobmonitor.JobMonitor} interface. This webservice will be
29 * notified whenever the application changes state.
30 * @throws CeaException
31 * @return true if registered successfully.
32 */
33 public boolean registerProgressListener(String executionId,URI endpoint) throws CeaException;
34 /*** register a remote result listener with an application
35 *
36 * @param executionId the server-assigned id of a current application (which may either be running, or waiting to run)
37 * @param endpoint endpoint of a webservice implementing the {@link CeaResultListener} interface. This webservice will be
38 * notified when the exection results for the application become available.
39 * @return true if registered successfully
40 * @throws CeaException
41 */
42 public boolean registerResultsListener(String executionId,URI endpoint) throws CeaException;
43
44
45 /*** query the status of a running application
46 * @param executionId the (cea-assigned) id of the application to query.
47 * @return a message containing information about the status of the application.
48 * @throws CeaException if owt goes wrong.*/
49 public MessageType queryExecutionStatus(String executionId) throws CeaException;
50
51 /*** get results from an application - list will be empty / semi-blank if the application hasn't finished producing results yet
52 * @param executionId the (cea-assigned) id of the application to query.
53 * @return a list of resuls.
54 * @throws CeaException*/
55 public ResultListType getResults(String executionId) throws CeaException;
56
57 /*** get summary of an application execution
58 * @param executionId the (cea-assigned) id of the application to query.
59 * @return an executioin summary for this application.
60 * @throws CeaException*/
61
62 public ExecutionSummaryType getSummary(String executionId) throws CeaException;
63
64
65 }
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88