View Javadoc

1   /*$Id: QueryService.java,v 1.4 2004/07/26 12:07:38 nw Exp $
2    * Created on 16-Jun-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
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      // direct query methods
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  $Log: QueryService.java,v $
70  Revision 1.4  2004/07/26 12:07:38  nw
71  renamed indirect package to protocol,
72  renamed classes and methods within protocol package
73  javadocs
74  
75  Revision 1.3  2004/07/09 14:48:24  nw
76  updated to match change in type of register*Listener methods in cec wsdl
77  
78  Revision 1.2  2004/07/01 11:16:22  nw
79  merged in branch
80  nww-itn06-componentization
81  
82  Revision 1.1.2.2  2004/07/01 01:42:46  nw
83  final version, before merge
84  
85  Revision 1.1.2.1  2004/06/17 09:21:23  nw
86  finished all major functionality additions to core
87   
88  */