#include "2k/ComponentConfigurator/Configuration.idl"
//#include "2k/Environment/env.idl"
#include "dynamicTAO/src/DynamicConfigurator/dynamicConfigurator.idl"
//////////////////////////////////////////////////////////////////////
// The environmentService Module is only *temporarily* in this file
//////////////////////////////////////////////////////////////////////
/**
*
**/
module EnvironmentService{
enum SpecDiscriminant {CompName, CompPropertyList, CompReference};
typedef sequence Name;
/**
* In the current implementation CompSpec (and comp_name) is simply a sequence of 2 strings.
* The first containing the category name of the component and
* the second, the implementation name of the component.
**/
union CompSpec switch (SpecDiscriminant)
{
case CompName: Name comp_name;
};
};
interface AutoConfig
{
// typedef Object ImplementationRepository; This was giving problems it's
// probably something wrong with the version of TAO we're using and it
// should be fixed in the latest version.
// typedef DynamicConfigurator ImplementationRepository; // temporarily!
// another bug in the idl compiler prevented me from using the previous line.
// we'll have to hard-code DynamicConfigurator as the ImplementationRepository
// temporary solution:
#define ImplementationRepository DynamicConfigurator
exception NotFound{};
exception LoadFailure{};
/**
* Fetches and loads a new component making sure all its the dependencies
* are satisfied and explicitely represented. The component is loaded in the address
* space of the AutomaticConfigurationServer.
* This is the version of load_component that is most frequently used by clients of the
* AutomaticConfiguration service.
*@parm implRep the implementation repository from which to fetch the component.
*@parm compSpecification an specification of the component to be loaded.
*@parm factory a factory of ComponentConfigurators to be used in case the
* component itself does not create it. It may be nil if desired.
*@returns a reference to the ComponentConfigurator of the loaded component.
*@raises NotFound if the component can't be located.
*@raises LoadFailure if the component can't be loaded.
*/
Configuration::ComponentConfigurator
load_component (in ImplementationRepository implRep,
in EnvironmentService::CompSpec compSpecification,
in Configuration::Factory factory)
raises (NotFound, LoadFailure);
/**
* Loads a new component making sure all its the dependencies
* are satisfied and explicitely represented. The component is loaded in the server
* address space.
* This version of load_component is usually NOT used by clients of the
* AutomaticConfiguration service; it is tipically used by the service itself when
* it issues recursive calls.
* @parm compSpecification an specification of the component to be loaded.
* @parm factory a factory of ComponentConfigurators to be used in case the
* component itself does not create it.
* @returns a reference to the ComponentConfigurator of the loaded component.
* @raises NotFound if the component can't be located.
* @raises LoadFailure if the component can't be loaded.
*/
Configuration::ComponentConfigurator
load_component_aux (in EnvironmentService::Name compSpecification,
in Configuration::Factory factory)
raises (NotFound, LoadFailure);
/**
* Sets a new Prerequisite Parser in the Automatic Configuration server. (Not implemented yet).
* @parm implName the name of the parser in the server's repository.
* @parm params initialization parameters to the new parser.
* @raises NotFound if the parser is not located.
* @raises LoadFailure if the parser does not load properly.
*/
void setParser (in string impName, in string params)
raises (NotFound, LoadFailure);
/**
* Sets a new Prerequisite Resolver in the Automatic Configuration server. (Not implemented yet).
* @parm implName the name of the resolver in the server's repository.
* @parm params initialization parameters to the new parser.
* @raises NotFound if the parser is not located.
* @raises LoadFailure if the parser does not load properly.
*/
void setResolver (in string impName, in string params)
raises (NotFound, LoadFailure);
/**
* Returns a reference to the server's DynamicConfigurator. With this
* reference, the client is able to inspect the server's repository and
* upload new implementations if necessary.
* @returns a reference to the server's DynamicConfigurator.
* @raises NotFound if the server's DynamicConfigurator is not found
* which indicates a serious error condition.
*/
DynamicConfigurator getRepository ()
raises (NotFound);
};