version 1.191, 2005/11/29 18:45:35
|
version 1.192, 2005/12/09 19:02:29
|
|
|
(activeSubscriptions); | (activeSubscriptions); |
noProviderSubscriptions.clear (); | noProviderSubscriptions.clear (); |
| |
|
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"%u active subscription(s) found on initialization", |
|
activeSubscriptions.size ()); |
|
|
String condition; | String condition; |
String query; | String query; |
String queryLanguage; | String queryLanguage; |
|
|
// | // |
// Check for expired subscription | // Check for expired subscription |
// | // |
try{ |
try |
|
{ |
if (_isExpired (activeSubscriptions [i])) | if (_isExpired (activeSubscriptions [i])) |
{ | { |
CIMObjectPath path = activeSubscriptions [i].getPath (); | CIMObjectPath path = activeSubscriptions [i].getPath (); |
|
|
|
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"Deleting expired subscription on initialization: %s", |
|
(const char *) path.toString ().getCString ()); |
|
|
_deleteExpiredSubscription (path); | _deleteExpiredSubscription (path); |
// If subscription is expired delete the subscription | // If subscription is expired delete the subscription |
// and continue on to the next one. | // and continue on to the next one. |
continue; | continue; |
} | } |
} catch (DateTimeOutOfRangeException& e) |
} |
|
catch (DateTimeOutOfRangeException& e) |
{ | { |
// | // |
// This instance from the repository is invalid | // This instance from the repository is invalid |
|
|
| |
if (indicationProviders.size () == 0) | if (indicationProviders.size () == 0) |
{ | { |
|
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"No providers found for subscription on initialization: %s", |
|
(const char *) |
|
activeSubscriptions [i].getPath ().toString ().getCString ()); |
|
|
// | // |
// There are no providers that can support this subscription | // There are no providers that can support this subscription |
// Implement the subscription's On Fatal Error Policy | // Implement the subscription's On Fatal Error Policy |
|
|
| |
if (acceptedProviders.size () == 0) | if (acceptedProviders.size () == 0) |
{ | { |
|
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"No providers accepted subscription on initialization: %s", |
|
(const char *) |
|
activeSubscriptions [i].getPath ().toString ().getCString ()); |
|
|
// | // |
// No providers accepted the subscription | // No providers accepted the subscription |
// Implement the subscription's On Fatal Error Policy | // Implement the subscription's On Fatal Error Policy |
|
|
(_CLASS_NO_PROVIDER_ALERT, subscriptions); | (_CLASS_NO_PROVIDER_ALERT, subscriptions); |
| |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, | Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
"Sending NoProvider Alert for %d subscriptions", |
"Sending NoProvider Alert for %u subscriptions", |
subscriptions.size ()); | subscriptions.size ()); |
_sendAlerts (subscriptions, indicationInstance); | _sendAlerts (subscriptions, indicationInstance); |
#endif | #endif |
|
|
(_CLASS_NO_PROVIDER_ALERT, noProviderSubscriptions); | (_CLASS_NO_PROVIDER_ALERT, noProviderSubscriptions); |
| |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, | Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
"Sending NoProvider Alert for %d subscriptions", |
"Sending NoProvider Alert for %u subscriptions", |
noProviderSubscriptions.size ()); | noProviderSubscriptions.size ()); |
_sendAlerts (noProviderSubscriptions, indicationInstance); | _sendAlerts (noProviderSubscriptions, indicationInstance); |
#endif | #endif |
|
|
// Send CimomShutdownAlertIndication to each unique handler instance | // Send CimomShutdownAlertIndication to each unique handler instance |
// | // |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, | Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
"Sending CIMServerShutdown Alert for %d subscriptions", |
"Sending CIMServerShutdown Alert for %u subscriptions", |
activeSubscriptions.size ()); | activeSubscriptions.size ()); |
_sendAlerts (activeSubscriptions, indicationInstance); | _sendAlerts (activeSubscriptions, indicationInstance); |
} | } |
|
|
// Send NoProviderAlertIndication to each unique handler instance | // Send NoProviderAlertIndication to each unique handler instance |
// | // |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, | Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
"Sending NoProvider Alert for %d subscriptions", |
"Sending NoProvider Alert for %u subscriptions", |
formerSubscriptions.size ()); | formerSubscriptions.size ()); |
_sendAlerts (formerSubscriptions, indicationInstance); | _sendAlerts (formerSubscriptions, indicationInstance); |
#endif | #endif |
|
|
// instance | // instance |
// | // |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, | Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
"Sending ProviderDisabled Alert for %d subscriptions", |
"Sending ProviderDisabled Alert for %u subscriptions", |
providerSubscriptions.size ()); | providerSubscriptions.size ()); |
_sendAlerts (providerSubscriptions, indicationInstance); | _sendAlerts (providerSubscriptions, indicationInstance); |
#endif | #endif |
|
|
Array <ProviderClassList> indicationProviders; | Array <ProviderClassList> indicationProviders; |
Array <CIMInstance> providerInstances; | Array <CIMInstance> providerInstances; |
Array <CIMInstance> providerModuleInstances; | Array <CIMInstance> providerModuleInstances; |
Boolean duplicate = false; |
|
| |
CIMPropertyList requiredPropertyList; | CIMPropertyList requiredPropertyList; |
| |
// | // |
// For each indication subclass, get providers | // For each indication subclass, get providers |
// | // |
for (Uint32 i = 0; i < indicationSubclasses.size (); i++) |
for (Uint32 i = 0, n = indicationSubclasses.size (); i < n; i++) |
{ | { |
// Get required property list from filter query (WHERE clause) | // Get required property list from filter query (WHERE clause) |
// from this indication subclass | // from this indication subclass |
|
|
PEGASUS_ASSERT (providerInstances.size () == | PEGASUS_ASSERT (providerInstances.size () == |
providerModuleInstances.size ()); | providerModuleInstances.size ()); |
| |
duplicate = false; |
Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"%u indication provider(s) found for class %s", |
|
providerInstances.size (), |
|
(const char *) |
|
indicationSubclasses[i].getString ().getCString ()); |
| |
// | // |
// Merge into list of ProviderClassList structs | // Merge into list of ProviderClassList structs |
// | // |
for (Uint32 j = 0; j < providerInstances.size () && !duplicate; j++) |
for (Uint32 j = 0, n = providerInstances.size (); j < n; j++) |
{ | { |
provider.classList.clear (); | provider.classList.clear (); |
duplicate = false; |
Boolean duplicate = false; |
| |
// | // |
// See if indication provider is already in list | // See if indication provider is already in list |
// | // |
for (Uint32 k = 0; |
for (Uint32 k = 0, n = indicationProviders.size (); |
k < indicationProviders.size () && !duplicate; k++) |
k < n && !duplicate; k++) |
{ | { |
if ((providerInstances [j].getPath ().identical | if ((providerInstances [j].getPath ().identical |
(indicationProviders [k].provider.getPath ())) && | (indicationProviders [k].provider.getPath ())) && |