Contains all NamedObject instances for a service, acting like a global registry and instantiating each object at startup.
More...
#include <rwsf/core/NamingContext.h>
A rwsf::NamingContext object contains all rwsf::NamedObject instances relevant to a particular service. On startup, the Agent creates all registered named objects and then stores them together in an instance of rwsf::NamingContext specific to each service. This context object acts like a global registry and instantiates each object.
See the class description for rwsf::NamedObject for detail on how to create or edit named object configuration files so that named objects are properly loaded at startup, and how NamedObject instances are used in the system.
rwsf::NamingContext::NamingContext |
( |
| ) |
|
rwsf::NamingContext::~NamingContext |
( |
| ) |
|
void rwsf::NamingContext::bind |
( |
const std::string & |
name, |
|
|
const rwsf::NamedObject & |
obj |
|
) |
| |
Returns the global instance of the naming context. If a naming context does not exist, creates a new NamingContext instance.
Returns an enumeration of the names in this context.
void rwsf::NamingContext::load |
( |
const std::string & |
filename, |
|
|
const std::string & |
librarySuffix = std::string(RWSF_DEFAULT_LIBSUFFIX) |
|
) |
| |
Reads in an object configuration file and registers the named objects with this naming context instance. See rwsf::NamedObject for information on the format of the configuration file.
- Exceptions
-
rwsf::FileNotFoundException | Specified configuration file filename not found. |
static void rwsf::NamingContext::loadGlobal |
( |
const std::string & |
filename, |
|
|
const std::string & |
librarySuffix = std::string(RWSF_DEFAULT_LIBSUFFIX) |
|
) |
| |
|
static |
Reads in an object configuration file and registers the named objects with the global naming context. See rwsf::NamedObject for information on the format of the configuration file.
- Exceptions
-
rwsf::FileNotFoundException | Specified configuration file filename not found. |
void rwsf::NamingContext::unbind |
( |
const std::string & |
name | ) |
|
Removes this named object from the context.
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners. Provide feedback to Rogue Wave about its documentation.
|