version 1.266, 2011/01/12 11:39:55
|
version 1.267, 2011/01/13 06:00:28
|
|
|
#ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT | #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT |
_indicationServiceConfiguration.reset( | _indicationServiceConfiguration.reset( |
new IndicationServiceConfiguration(_cimRepository)); | new IndicationServiceConfiguration(_cimRepository)); |
|
#else |
|
_enabledState = _ENABLEDSTATE_DISABLED; |
#endif | #endif |
// Initialize the Indication Service | // Initialize the Indication Service |
_initialize(); | _initialize(); |
|
|
"Exception caught in attempting to " | "Exception caught in attempting to " |
"initialize Indication Service: %s", | "initialize Indication Service: %s", |
(const char*)e.getMessage().getCString())); | (const char*)e.getMessage().getCString())); |
|
#ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT |
_indicationServiceConfiguration->setHealthState( | _indicationServiceConfiguration->setHealthState( |
_HEALTHSTATE_DEGRADEDWARNING); | _HEALTHSTATE_DEGRADEDWARNING); |
|
#endif |
} | } |
| |
} | } |
|
|
{ | { |
} | } |
| |
|
Uint16 IndicationService::_getEnabledState() |
|
{ |
|
#ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT |
|
return _indicationServiceConfiguration->getEnabledState(); |
|
#else |
|
return _enabledState; |
|
#endif |
|
} |
|
|
|
void IndicationService::_setEnabledState(Uint16 state) |
|
{ |
|
#ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT |
|
_indicationServiceConfiguration->setEnabledState(state); |
|
#else |
|
_enabledState = state; |
|
#endif |
|
} |
| |
void IndicationService::_handle_async_request(AsyncRequest *req) | void IndicationService::_handle_async_request(AsyncRequest *req) |
{ | { |
|
|
| |
try | try |
{ | { |
if (_indicationServiceConfiguration->getEnabledState() != |
if (_getEnabledState() != _ENABLEDSTATE_ENABLED) |
_ENABLEDSTATE_ENABLED) |
|
{ | { |
_handleCimRequestWithServiceNotEnabled(message); | _handleCimRequestWithServiceNotEnabled(message); |
} | } |
|
|
"CANNOT_EXECUTE_REQUEST", | "CANNOT_EXECUTE_REQUEST", |
"The requested operation cannot be executed." | "The requested operation cannot be executed." |
" IndicationService EnabledState : $0.", | " IndicationService EnabledState : $0.", |
_getEnabledStateString( |
_getEnabledStateString(_getEnabledState()))); |
_indicationServiceConfiguration->getEnabledState()))); |
|
| |
CIMResponseMessage* response = cimRequest->buildResponse(); | CIMResponseMessage* response = cimRequest->buildResponse(); |
response->cimException = PEGASUS_CIM_EXCEPTION_L( | response->cimException = PEGASUS_CIM_EXCEPTION_L( |
|
|
"CANNOT_EXECUTE_REQUEST", | "CANNOT_EXECUTE_REQUEST", |
"The requested operation cannot be executed." | "The requested operation cannot be executed." |
" IndicationService EnabledState : $0.", | " IndicationService EnabledState : $0.", |
_getEnabledStateString( |
_getEnabledStateString(_getEnabledState()))); |
_indicationServiceConfiguration->getEnabledState()))); |
|
_enqueueResponse(cimRequest, response); | _enqueueResponse(cimRequest, response); |
} | } |
} | } |
|
|
if (ConfigManager::parseBooleanValue( | if (ConfigManager::parseBooleanValue( |
configManager->getCurrentValue("enableIndicationService"))) | configManager->getCurrentValue("enableIndicationService"))) |
{ | { |
_indicationServiceConfiguration->setEnabledState(_ENABLEDSTATE_ENABLED); |
_setEnabledState(_ENABLEDSTATE_ENABLED); |
_initializeActiveSubscriptionsFromRepository(0); | _initializeActiveSubscriptionsFromRepository(0); |
} | } |
| |
|
|
PEG_METHOD_ENTER(TRC_INDICATION_SERVICE, | PEG_METHOD_ENTER(TRC_INDICATION_SERVICE, |
"IndicationService::sendSubscriptionInitComplete"); | "IndicationService::sendSubscriptionInitComplete"); |
| |
if (_indicationServiceConfiguration->getEnabledState() == |
if (_getEnabledState() == _ENABLEDSTATE_DISABLED) |
_ENABLEDSTATE_DISABLED) |
|
{ | { |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return; | return; |