org.griphyn.cPlanner.code
Interface CodeGenerator

All Known Implementing Classes:
Abstract, CondorGenerator, GRMS, HashedFile, Stork

public interface CodeGenerator

The interface that allows us to plug in various code generators for writing out the concrete plan. Each of Code Generators are dependant upon the underlying workflow executors being used. A Code Generator implementation generates the concrete plan in the input format of the underlying Workflow Executor. The appropriate format can be condor submit files, or some XML description.

Version:
$Revision: 410 $
Author:
Karan Vahi, Gaurang Mehta

Field Summary
static String VERSION
          The version number associated with this API of Code Generator.
 
Method Summary
 void generateCode(ADag dag)
          Generates the code for the concrete workflow in the input format of the workflow executor being used.
 void generateCode(ADag dag, SubInfo job)
          Generates the code for a single job in the input format of the workflow executor being used.
 void initialize(PegasusBag bag)
          Initializes the Code Generator implementation.
 void reset()
          Resets the Code Generator implementation.
 boolean startMonitoring()
          Starts monitoring of the workflow by invoking a workflow monitor daemon.
 

Field Detail

VERSION

static final String VERSION
The version number associated with this API of Code Generator.

See Also:
Constant Field Values
Method Detail

initialize

void initialize(PegasusBag bag)
                throws CodeGeneratorException
Initializes the Code Generator implementation.

Parameters:
bag - the bag of initialization objects.
Throws:
CodeGeneratorException - in case of any error occuring code generation.

generateCode

void generateCode(ADag dag)
                  throws CodeGeneratorException
Generates the code for the concrete workflow in the input format of the workflow executor being used.

Parameters:
dag - the concrete workflow.
Throws:
CodeGeneratorException - in case of any error occuring code generation.

generateCode

void generateCode(ADag dag,
                  SubInfo job)
                  throws CodeGeneratorException
Generates the code for a single job in the input format of the workflow executor being used.

Parameters:
dag - the dag of which the job is a part of.
job - the SubInfo object holding the information about that particular job.
Throws:
CodeGeneratorException - in case of any error occuring code generation.

startMonitoring

boolean startMonitoring()
Starts monitoring of the workflow by invoking a workflow monitor daemon. The monitoring should start only after the output files have been generated. FIXME: It should actually happen after the workflow has been submitted. Eventually should be a separate monitor interface, and submit writers should be loaded by an AbstractFactory.

Returns:
boolean indicating whether could successfully start the monitor daemon or not.

reset

void reset()
           throws CodeGeneratorException
Resets the Code Generator implementation.

Throws:
CodeGeneratorException - in case of any error occuring code generation.


Copyright © 2007 The University of Southern California. All Rights Reserved.