com.metamatrix.query.processor.program
Class ProgramEnvironment

java.lang.Object
  extended by com.metamatrix.query.processor.program.ProgramEnvironment
Direct Known Subclasses:
ProcedureEnvironment

public abstract class ProgramEnvironment
extends java.lang.Object

This interface defines the environment that programs run in and what ProgramInstructions can access during execution.


Constructor Summary
ProgramEnvironment()
          Default constructor
 
Method Summary
abstract  void executePlan(java.lang.Object command, java.lang.String rsName)
          Execute a ProcessorPlan and return the tupelSourceID for the results.
 java.util.Stack getProgramStack()
          Get the Stack of Program objects, with the currently running Program on top.
 void incrementProgramCounter()
           
abstract  void initialize(ProcessorPlan plan)
          Connect an XMLPlan to the environment
 Program peek()
           
 void pop()
           
 void push(Program program)
           
abstract  void removeResults(java.lang.String rsName)
          Remove the a data source from the environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramEnvironment

public ProgramEnvironment()
Default constructor

Method Detail

initialize

public abstract void initialize(ProcessorPlan plan)
Connect an XMLPlan to the environment

Parameters:
plan - XMLPlan

getProgramStack

public java.util.Stack getProgramStack()
Get the Stack of Program objects, with the currently running Program on top.

Returns:
Stack of currently running Programs, with the current Program on top.

peek

public Program peek()

pop

public void pop()
         throws MetaMatrixComponentException
Throws:
MetaMatrixComponentException

push

public void push(Program program)

incrementProgramCounter

public void incrementProgramCounter()
                             throws MetaMatrixComponentException
Throws:
MetaMatrixComponentException

executePlan

public abstract void executePlan(java.lang.Object command,
                                 java.lang.String rsName)
                          throws MetaMatrixComponentException,
                                 MetaMatrixProcessingException

Execute a ProcessorPlan and return the tupelSourceID for the results. The TupleSourceID could be used by differrent ProgramInstructions that use this environment to access results. The

Parameters:
command - The command to execute which is a ProcessPlan
rsName - The name of the result set, which can be used later to obtain the tuple source.
Throws:
MetaMatrixComponentException
MetaMatrixProcessingException

removeResults

public abstract void removeResults(java.lang.String rsName)
                            throws MetaMatrixComponentException
Remove the a data source from the environment.

Parameters:
rsName - The name of the result set.
Throws:
MetaMatrixComponentException


Copyright © 2009. All Rights Reserved.