View Javadoc

1   /*
2    * $Id: ExecutionController.java,v 1.3 2004/07/26 12:07:38 nw Exp $
3    * 
4    * Created on 22-Mar-2004 by Paul Harrison (pah@jb.man.ac.uk)
5    *
6    * Copyright 2004 AstroGrid. All rights reserved.
7    *
8    * This software is published under the terms of the AstroGrid 
9    * Software License version 1.2, a copy of which has been included 
10   * with this distribution in the LICENSE.txt file.  
11   *
12   */ 
13  
14  package org.astrogrid.applications.manager;
15  
16  import org.astrogrid.applications.CeaException;
17  import org.astrogrid.workflow.beans.v1.Tool;
18  
19  /***
20    Interface to a service that allows applications to be executed and controlled
21   * * @author Paul Harrison (pah@jb.man.ac.uk) 22-Mar-2004
22   * @version $Name: HEAD $
23   * @since iteration5
24   */
25  public interface ExecutionController {
26      /*** create a new application
27       * 
28       * @param tool provides application name, interface name, parameters
29       * @param jobstepID id assigned by client to this new execution
30       * @return id assigned by server to this new execution.
31       * @throws CeaException
32       */
33      public String init(Tool tool, String jobstepID) throws CeaException;
34      
35  
36     /*** starts asynchronous executoion of a application
37      * 
38      * @param executionId the server-assigned id of a previously initialized application
39      * @return true if execution started successfully
40      * @throws CeaException
41      */
42     public boolean execute(String executionId) throws CeaException;
43  
44     /*** abort execution of an application (not supported by all applications)
45      * 
46      * @param executionId the servier-assigned id of an application
47      * @return true if the application could be aborted
48      * @throws CeaException
49      */
50     public boolean abort(String executionId) throws  CeaException;
51  
52  
53  
54  
55  }