Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress C++ API Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ConfigurationManager

Group:  Configuration Manager


Does not inherit

Local Index

Members

Header File

#include rwsf/cm/ConfigurationManager.h

Description

Class ConfigurationManager represents a central point for receiving and modifying binding information in associated ConfigurationHandlers.

When a ConfigurationManager receives a request for a binding, it checks its local cache, then each of its ConfigurationHandlers, in order, until either a binding by the given name is found or all possible sources are exhausted. If the latter occurs, an invalid (!.isValid()) ConfigBinding is returned.

A binding can automatically include the values of other bindings using references. If the value of a simple binding begins with the key character '@', the CM searches its sources for a binding by the name following the character. If found, the binding value is replaced by the referenced binding value before being returned.

If a reference is not resolvable, an invalid ConfigBinding is returned. Example use: a service needs to store transaction data in a database. A company-wide WSDL uses a reference for a database connection. The database connection is then defined in region-specifc WSDL files for regional databases, thus allowing the major portion of common configuration information to be stored in a common file with location-specific information to be in smaller files.

Public Constructors

ConfigurationManager();

Public Destructors

~ConfigurationManager();

Public Member Functions

void
addConfigurationHandler(ConfigurationHandler * handler);
void
clear();
ConfigBinding
getBinding(const std::string & name) const;
std::list< std::string >
getBindingNames() const;
rwsf::Logger
getLogger();
bool
hasBinding(const std::string & name) const;
void
initialize(const std::string & configFile);
void
loadBindingDirectory(const std::string & dir);
void
loadBindingFile(const std::string & file);
void
removeBinding(const std::string & key);
void
removeConfigurationHandler(ConfigurationHandler * handler);
void
setBinding(const std::string & key,
    const ConfigBinding & b);
void
setLogger(const rwsf::Logger & logger);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.