01: /**
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */package org.griphyn.cPlanner.code;
15:
16: import org.griphyn.cPlanner.classes.SubInfo;
17:
18: import org.griphyn.cPlanner.common.PegasusProperties;
19:
20: /**
21: * The interface that defines the creation of a POSTSCRIPT for a job.
22: * The POSTSCRIPT created is dependant on the GridStart being used to enable
23: * the job.
24: *
25: * @author Karan Vahi vahi@isi.edu
26: * @version $Revision: 50 $
27: */
28:
29: public interface POSTScript {
30:
31: /**
32: * The version number associated with this API of GridStart.
33: */
34: public static final String VERSION = "1.0";
35:
36: /**
37: * Initialize the POSTScript implementation.
38: *
39: * @param properties the <code>PegasusProperties</code> object containing all
40: * the properties required by Pegasus.
41: * @param path the path to the POSTScript on the submit host.
42: * @param submitDir the submit directory where the submit file for the job
43: * has to be generated.
44: */
45: public void initialize(PegasusProperties properties, String path,
46: String submitDir);
47:
48: /**
49: * Constructs the postscript that has to be invoked on the submit host
50: * after the job has executed on the remote end. The postscript usually
51: * works on the output generated by the executable that is used to grid
52: * enable a job, and has been piped back by Condor.
53: * <p>
54: * The postscript should be constructed and populated as a profile
55: * in the DAGMAN namespace.
56: *
57: *
58: * @param job the <code>SubInfo</code> object containing the job description
59: * of the job that has to be enabled on the grid.
60: * @param key the <code>DAGMan</code> profile key that has to be inserted.
61: *
62: * @return boolean true if postscript was generated,else false.
63: */
64: public boolean construct(SubInfo job, String key);
65:
66: /**
67: * Returns a short textual description of the implementing class.
68: *
69: * @return short textual description.
70: */
71: public String shortDescribe();
72:
73: }
|