Tasks #268
Unify config parsing mechanism
Status: | Resolved | Start date: | 04/29/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | C++ | Estimated time: | 4.00 hours | |
Target version: | - |
Description
The desired sequence of actions is:
- rsb::Factory constructor
- reads config file and environment variable
- config file syntax is ini files with sections per connector implementation
- builds its default ParticipantConfig using the configuration file
- reads config file and environment variable
Afterwards no more file parsing is required and the parser instance can b removed.
Defaults for each connector are hard-coded in the connectors and not part of a configuration class. The parser for ini files should either come from boost (if existing) or be part of RSC. Also the file + environment merging algorithm of options should be implemented there.
Associated revisions
Made ParticipantConfig class configurable via the new rsc::config facility
refs #268
refs #268
- CMakeLists.txt: added dependency on Boost.Filesystem which is used
for reading of configuration files - src/rsb/ParticipantConfig.{h,cpp}: changed transport storage to
std::map; added getTransport; added configuration methods fromFile,
fromEnvironment and fromConfiguration; simplified implementation of
operator<<
Made ParticipantConfig a friend of QualityOfServiceSpec
refs #268
refs #268
- src/rsb/QualityOfServiceSpec.h: ParticipantConfig has to be a friend
of QualityOfServiceSpec to manipulate its data members when loading
configurations
Specify env var prefix in src/rsb/ParticipantConfig.cpp
refs #268
refs #268
- src/rsb/ParticipantConfig.cpp: explicitly specify RSB_ prefix in
EnvironmentVariableSource
Use configuration capability of ParticipantConfig in Factory
refs #268
refs #268
- src/rsb/Factory.{h,cpp}: retrieve default ParticipantConfig from
configuration sources - src/rsb/transport/spread/SpreadConnection.cpp: defaults are now
hard-coded; old configuration mechanism is no longer used - src/rsb/transport/spread/SpreadConnector.{h,cpp}: removed one
constructor
Removed old configuration system in src/rsb/util/*
fixes #268
fixes #268
- src/CMakeLists.txt: removed files in src/rsb/util
- src/rsb/util/ConfigException.{h,cpp}: removed; old configuration
system is no longer used - src/rsb/util/Configuration.{h,cpp}: likewise
- src/rsb/transport/spread/SpreadConnection.cpp: removed dependency on
src/rsb/util/Configuration.h
History
#1 Updated by J. Wienke almost 13 years ago
- Assignee set to J. Moringen
#2 Updated by J. Moringen almost 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r734.