version 1.197, 2006/02/10 22:20:43
|
version 1.198, 2006/05/09 19:09:36
|
|
|
_cimRepository(repository) | _cimRepository(repository) |
{ | { |
_enableSubscriptionsForNonprivilegedUsers = false; | _enableSubscriptionsForNonprivilegedUsers = false; |
|
_authenticationEnabled = true; |
| |
try | try |
{ | { |
|
|
} | } |
else | else |
{ | { |
|
_authenticationEnabled = false; |
// Authentication needs to be enabled to perform authorization | // Authentication needs to be enabled to perform authorization |
// tests. | // tests. |
_enableSubscriptionsForNonprivilegedUsers = true; | _enableSubscriptionsForNonprivilegedUsers = true; |
|
|
} | } |
break; | break; |
| |
|
case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE: |
|
try |
|
{ |
|
_handleNotifyProviderFailRequest (message); |
|
} |
|
catch (...) |
|
{ |
|
; |
|
} |
|
break; |
|
|
default: | default: |
// | // |
// A message type not supported by the Indication Service | // A message type not supported by the Indication Service |
|
|
(const Message* message) | (const Message* message) |
{ | { |
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, | PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, |
"IndicationService::_handleEnumerateInstancesNamesRequest"); |
"IndicationService::_handleEnumerateInstanceNamesRequest"); |
| |
CIMEnumerateInstanceNamesRequestMessage* request = | CIMEnumerateInstanceNamesRequestMessage* request = |
(CIMEnumerateInstanceNamesRequestMessage*) message; | (CIMEnumerateInstanceNamesRequestMessage*) message; |
|
|
// | // |
// Get list of affected subscriptions | // Get list of affected subscriptions |
// | // |
// _subscriptionTable->getAndUpdateProviderSubscriptions also updates the |
// _subscriptionTable->reflectProviderDisable also updates the |
// Active Subscriptions hash table, and implements each subscription's | // Active Subscriptions hash table, and implements each subscription's |
// On Fatal Error policy, if necessary | // On Fatal Error policy, if necessary |
// | // |
providerSubscriptions.clear (); | providerSubscriptions.clear (); |
providerSubscriptions = _subscriptionTable->getAndUpdateProviderSubscriptions |
providerSubscriptions = _subscriptionTable->reflectProviderDisable |
(providers [i]); | (providers [i]); |
| |
if (providerSubscriptions.size () > 0) | if (providerSubscriptions.size () > 0) |
|
|
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
} | } |
| |
|
void IndicationService::_handleNotifyProviderFailRequest |
|
(Message * message) |
|
{ |
|
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, |
|
"IndicationService::_handleNotifyProviderFailRequest"); |
|
|
|
CIMNotifyProviderFailRequestMessage * request = |
|
dynamic_cast <CIMNotifyProviderFailRequestMessage *> (message); |
|
|
|
String moduleName = request->moduleName; |
|
String userName = request->userName; |
|
|
|
// |
|
// Determine providers in module that were serving active subscriptions |
|
// and update the Active Subscriptions Table |
|
// |
|
Array <ActiveSubscriptionsTableEntry> providerModuleSubscriptions = |
|
_subscriptionTable->reflectProviderModuleFailure |
|
(moduleName, userName, _authenticationEnabled); |
|
|
|
// |
|
// FUTURE: Attempt to recreate the subscription state |
|
// |
|
|
|
// |
|
// Send response |
|
// |
|
CIMResponseMessage * response = request->buildResponse (); |
|
CIMNotifyProviderFailResponseMessage * failResponse = |
|
(CIMNotifyProviderFailResponseMessage *) response; |
|
failResponse->numSubscriptionsAffected = |
|
providerModuleSubscriptions.size (); |
|
_enqueueResponse (request, response); |
|
} |
|
|
Boolean IndicationService::_canCreate ( | Boolean IndicationService::_canCreate ( |
CIMInstance & instance, | CIMInstance & instance, |
const CIMNamespaceName & nameSpace) | const CIMNamespaceName & nameSpace) |
|
|
return; | return; |
} | } |
| |
|
// |
|
// Update subscription hash tables |
|
// |
|
_subscriptionTable->removeSubscription |
|
(subscription, |
|
indicationSubclasses, |
|
nameSpace, |
|
indicationProviders); |
|
|
CIMRequestMessage * aggRequest = 0; | CIMRequestMessage * aggRequest = 0; |
| |
if (origRequest == 0) | if (origRequest == 0) |
|
|
} | } |
| |
// | // |
// Update subscription hash tables |
|
// Delete Instance, Modify Instance, or Delete Referencing or Expired |
|
// Subscription |
|
// |
|
CIMDeleteSubscriptionRequestMessage * request = |
|
(CIMDeleteSubscriptionRequestMessage *) |
|
operationAggregate->getRequest (0); |
|
|
|
_subscriptionTable->removeSubscription |
|
(request->subscriptionInstance, |
|
operationAggregate->getIndicationSubclasses (), |
|
request->nameSpace, |
|
checkProviders); |
|
|
|
// |
|
// For Delete Instance or Modify Instance request, send response | // For Delete Instance or Modify Instance request, send response |
// | // |
if (operationAggregate->requiresResponse ()) | if (operationAggregate->requiresResponse ()) |