本文整理汇总了C++中ConfigManager::initCurrentValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigManager::initCurrentValue方法的具体用法?C++ ConfigManager::initCurrentValue怎么用?C++ ConfigManager::initCurrentValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigManager
的用法示例。
在下文中一共展示了ConfigManager::initCurrentValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _readAndProcessRequest
//.........这里部分代码省略.........
// Bail out.
//
if (!_isInitialised &&
(request->getType() != CIM_INITIALIZE_PROVIDER_AGENT_REQUEST_MESSAGE))
{
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
MessageLoaderParms(
"ProviderManager.ProviderAgent.ProviderAgent."
"PROVIDERAGENT_NOT_INITIALIZED",
"cimprovagt \"$0\" was not yet initialized "
"prior to receiving a request message. Exiting.",
_agentId));
_terminating = true;
PEG_METHOD_EXIT();
return false;
}
//
// Check for messages to be handled by the Agent itself.
//
if (request->getType() == CIM_INITIALIZE_PROVIDER_AGENT_REQUEST_MESSAGE)
{
// Process the request in this thread
AutoPtr<CIMInitializeProviderAgentRequestMessage> ipaRequest(
dynamic_cast<CIMInitializeProviderAgentRequestMessage*>(request));
PEGASUS_ASSERT(ipaRequest.get() != 0);
ConfigManager::setPegasusHome(ipaRequest->pegasusHome);
ConfigManager* configManager = ConfigManager::getInstance();
// Initialize the configuration properties
for (Uint32 i = 0; i < ipaRequest->configProperties.size(); i++)
{
configManager->initCurrentValue(
ipaRequest->configProperties[i].first,
ipaRequest->configProperties[i].second);
}
// Set the default resource bundle directory for the MessageLoader
MessageLoader::setPegasusMsgHome(ConfigManager::getHomedPath(
configManager->getCurrentValue("messageDir")));
// Set the log file directory
#if !defined(PEGASUS_USE_SYSLOGS)
Logger::setHomeDirectory(ConfigManager::getHomedPath(
configManager->getCurrentValue("logdir")));
#endif
System::bindVerbose = ipaRequest->bindVerbose;
//
// Set _subscriptionInitComplete from value in
// InitializeProviderAgent request
//
_providerManagerRouter.setSubscriptionInitComplete
(ipaRequest->subscriptionInitComplete);
PEG_TRACE_CSTRING(TRC_PROVIDERAGENT, Tracer::LEVEL2,
"Processed the agent initialization message.");
// Notify the cimserver that the provider agent is initialized.
Uint32 messageLength = 0;
_pipeToServer->writeBuffer((const char*)&messageLength, sizeof(Uint32));
#if defined(PEGASUS_OS_ZOS) && defined(PEGASUS_ZOS_SECURITY)
// prepare and setup the thread-level security environment on z/OS
// if security initialization fails