(file) Return to DefaultProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / Default

Diff for /pegasus/src/Pegasus/ProviderManager2/Default/DefaultProviderManager.cpp between version 1.30 and 1.47

version 1.30, 2004/05/21 22:01:53 version 1.47, 2005/02/05 23:00:30
Line 1 
Line 1 
 //%2003////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 30 
Line 34 
 //              Mike Day, IBM (mdday@us.ibm.com) //              Mike Day, IBM (mdday@us.ibm.com)
 //              Karl Schopmeyer(k.schopmeyer@opengroup.org) - Fix associators. //              Karl Schopmeyer(k.schopmeyer@opengroup.org) - Fix associators.
 //              Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com) //              Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
   //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //                              Seema Gupta (gseema@in.ibm.com) for PEP135
   //                              Willis White (whiwill@us.ibm.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 42 
Line 49 
 #include <Pegasus/Common/StatisticalData.h> #include <Pegasus/Common/StatisticalData.h>
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
 #include <Pegasus/Common/MessageLoader.h> //l10n #include <Pegasus/Common/MessageLoader.h> //l10n
   #include <Pegasus/Common/Constants.h>
  
 #include <Pegasus/Common/QueryExpression.h>  #include <Pegasus/Query/QueryExpression/QueryExpression.h>
 #include <Pegasus/ProviderManager2/QueryExpressionFactory.h> #include <Pegasus/ProviderManager2/QueryExpressionFactory.h>
  
 #include <Pegasus/ProviderManager2/Default/Provider.h> #include <Pegasus/ProviderManager2/Default/Provider.h>
Line 75 
Line 83 
 }; };
  
 // //
 // Provider module status  // Default Provider Manager
 // //
 static const Uint16 _MODULE_OK       = 2;  
 static const Uint16 _MODULE_STOPPING = 9;  
 static const Uint16 _MODULE_STOPPED  = 10;  
   
 // provider manager  
 static LocalProviderManager providerManager;  
   
 DefaultProviderManager::DefaultProviderManager(void) DefaultProviderManager::DefaultProviderManager(void)
 { {
 } }
Line 178 
Line 179 
         response = handleDisableIndicationsRequest(request);         response = handleDisableIndicationsRequest(request);
  
         break;         break;
     case CIM_CONSUME_INDICATION_REQUEST_MESSAGE:  
         response = handleConsumeIndicationRequest(request);  
         break;  
   
     case CIM_EXPORT_INDICATION_REQUEST_MESSAGE:     case CIM_EXPORT_INDICATION_REQUEST_MESSAGE:
         response = handleExportIndicationRequest(request);         response = handleExportIndicationRequest(request);
         break;         break;
Line 341 
Line 338 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMPropertyList propertyList(request->propertyList);         CIMPropertyList propertyList(request->propertyList);
  
Line 445 
Line 442 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMPropertyList propertyList(request->propertyList);         CIMPropertyList propertyList(request->propertyList);
  
Line 550 
Line 547 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         // forward request         // forward request
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
Line 651 
Line 648 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         // forward request         // forward request
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
Line 752 
Line 749 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMPropertyList propertyList(request->propertyList);         CIMPropertyList propertyList(request->propertyList);
  
Line 857 
Line 854 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         // forward request         // forward request
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
Line 964 
Line 961 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         QueryExpression qx(QueryExpressionFactory::routeBuildQueryExpressionRep          QueryExpression qx(request->queryLanguage,request->query);
            (request->queryLanguage,request->query));  
  
         // forward request         // forward request
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
Line 1072 
Line 1068 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         // ATTN KS STAT_GETSTARTTIME;          STAT_GETSTARTTIME;
         pm_service_op_lock op_lock(&ph.GetProvider());         pm_service_op_lock op_lock(&ph.GetProvider());
  
         ph.GetProvider().associators(         ph.GetProvider().associators(
Line 1088 
Line 1084 
             request->resultRole,             request->resultRole,
             request->includeQualifiers,             request->includeQualifiers,
             request->includeClassOrigin,             request->includeClassOrigin,
             request->propertyList.getPropertyNameArray(),              request->propertyList,
             handler);             handler);
  
         STAT_PMS_PROVIDEREND;         STAT_PMS_PROVIDEREND;
Line 1180 
Line 1176 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
                   STAT_GETSTARTTIME;
         pm_service_op_lock op_lock(&ph.GetProvider());         pm_service_op_lock op_lock(&ph.GetProvider());
  
         ph.GetProvider().associatorNames(         ph.GetProvider().associatorNames(
Line 1284 
Line 1281 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
Line 1303 
Line 1300 
             request->role,             request->role,
             request->includeQualifiers,             request->includeQualifiers,
             request->includeClassOrigin,             request->includeClassOrigin,
             request->propertyList.getPropertyNameArray(),              request->propertyList,
             handler);             handler);
  
         STAT_PMS_PROVIDEREND;         STAT_PMS_PROVIDEREND;
Line 1393 
Line 1390 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         STAT_GETSTARTTIME;         STAT_GETSTARTTIME;
  
Line 1494 
Line 1491 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMName propertyName = request->propertyName;         CIMName propertyName = request->propertyName;
  
Line 1599 
Line 1596 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMName propertyName = request->propertyName;         CIMName propertyName = request->propertyName;
         CIMValue propertyValue = request->newValue;         CIMValue propertyValue = request->newValue;
Line 1707 
Line 1704 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(ContentLanguageListContainer(request->contentLanguages));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
         CIMObjectPath instanceReference(request->instanceName);         CIMObjectPath instanceReference(request->instanceName);
  
Line 1806 
Line 1803 
             request->nameSpace.getString(),             request->nameSpace.getString(),
             temp);             temp);
  
         String physicalName=_resolvePhysicalName(                  CIMInstance req_provider, req_providerModule;
            request->providerModule.getProperty(                  ProviderIdContainer pidc = (ProviderIdContainer)request->operationContext.get(ProviderIdContainer::NAME);
            request->providerModule.findProperty("Location")).getValue().toString());                  req_provider = pidc.getProvider();
                   req_providerModule = pidc.getModule();
  
         ProviderName name(          String physicalName=_resolvePhysicalName( req_providerModule.getProperty(
            request->provider.getProperty(request->provider.findProperty                                                    req_providerModule.findProperty("Location")).getValue().toString());
               ("Name")).getValue ().toString (),  
           ProviderName name(req_provider.getProperty(req_provider.findProperty("Name")).getValue ().toString (),
            physicalName,            physicalName,
            request->providerModule.getProperty(request->providerModule.findProperty                                    req_providerModule.getProperty(req_providerModule.findProperty
               ("InterfaceType")).getValue().toString(),               ("InterfaceType")).getValue().toString(),
            0);            0);
   
         // get cached or load new provider module         // get cached or load new provider module
         OpProviderHolder ph =         OpProviderHolder ph =
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);
Line 1825 
Line 1823 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(SubscriptionInstanceContainer                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
             (request->subscriptionInstance));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
         context.insert(SubscriptionFilterConditionContainer              context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));
             (request->condition, request->queryLanguage));              context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME));
         context.insert(SubscriptionLanguageListContainer              context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME));
             (request->acceptLanguages));                   context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));  
         context.insert(ContentLanguageListContainer(request->contentLanguages));  
  
         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();
  
Line 1938 
Line 1934 
             request->nameSpace.getString(),             request->nameSpace.getString(),
             temp);             temp);
  
         String physicalName=_resolvePhysicalName(                  CIMInstance req_provider, req_providerModule;
            request->providerModule.getProperty(                  ProviderIdContainer pidc = (ProviderIdContainer)request->operationContext.get(ProviderIdContainer::NAME);
            request->providerModule.findProperty("Location")).getValue().toString());                  req_provider = pidc.getProvider();
                   req_providerModule = pidc.getModule();
  
         ProviderName name(          String physicalName=_resolvePhysicalName( req_providerModule.getProperty(
            request->provider.getProperty(request->provider.findProperty                                                    req_providerModule.findProperty("Location")).getValue().toString());
               ("Name")).getValue ().toString (),  
           ProviderName name(req_provider.getProperty(req_provider.findProperty("Name")).getValue ().toString (),
            physicalName,            physicalName,
            request->providerModule.getProperty(request->providerModule.findProperty                                    req_providerModule.getProperty(req_providerModule.findProperty
               ("InterfaceType")).getValue().toString(),               ("InterfaceType")).getValue().toString(),
            0);            0);
  
Line 1956 
Line 1954 
  
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
                   context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
         context.insert(SubscriptionInstanceContainer              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
             (request->subscriptionInstance));              context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));
         context.insert(SubscriptionFilterConditionContainer              context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME));
             (request->condition, request->queryLanguage));              context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME));
         context.insert(SubscriptionLanguageListContainer                   context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME));
             (request->acceptLanguages));  
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));  
         context.insert(ContentLanguageListContainer(request->contentLanguages));  
  
         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();
  
Line 2070 
Line 2065 
             request->nameSpace.getString(),             request->nameSpace.getString(),
             temp);             temp);
  
         String physicalName=_resolvePhysicalName(                  CIMInstance req_provider, req_providerModule;
            request->providerModule.getProperty(                  ProviderIdContainer pidc = (ProviderIdContainer)request->operationContext.get(ProviderIdContainer::NAME);
            request->providerModule.findProperty("Location")).getValue().toString());  
  
         ProviderName name(                  req_provider = pidc.getProvider();
            request->provider.getProperty(request->provider.findProperty                  req_providerModule = pidc.getModule();
               ("Name")).getValue ().toString (),  
                 String physicalName=_resolvePhysicalName( req_providerModule.getProperty(
                                                     req_providerModule.findProperty("Location")).getValue().toString());
   
                 ProviderName name(req_provider.getProperty(req_provider.findProperty("Name")).getValue ().toString (),
            physicalName,            physicalName,
            request->providerModule.getProperty(request->providerModule.findProperty                                    req_providerModule.getProperty(req_providerModule.findProperty
               ("InterfaceType")).getValue().toString(),               ("InterfaceType")).getValue().toString(),
            0);            0);
  
Line 2089 
Line 2087 
         // convert arguments         // convert arguments
         OperationContext context;         OperationContext context;
  
         context.insert(IdentityContainer(request->userName));                  context.insert(request->operationContext.get(IdentityContainer::NAME));
         context.insert(SubscriptionInstanceContainer                  context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME));
             (request->subscriptionInstance));              context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
         context.insert(SubscriptionLanguageListContainer              context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME));
             (request->acceptLanguages));              context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME));
         context.insert(AcceptLanguageListContainer(request->acceptLanguages));  
         context.insert(ContentLanguageListContainer(request->contentLanguages));  
  
         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();         CIMObjectPath subscriptionName = request->subscriptionInstance.getPath();
  
Line 2174 
Line 2170 
  
     response->dest = request->queueIds.top();     response->dest = request->queueIds.top();
  
           CIMInstance req_provider, req_providerModule;
           ProviderIdContainer pidc = (ProviderIdContainer)request->operationContext.get(ProviderIdContainer::NAME);
   
           req_provider = pidc.getProvider();
           req_providerModule = pidc.getModule();
   
     EnableIndicationsResponseHandler *handler =     EnableIndicationsResponseHandler *handler =
         new EnableIndicationsResponseHandler(         new EnableIndicationsResponseHandler(
             request, response, request->provider, _indicationCallback);              request, response, req_provider, _indicationCallback);
   
   
  
     try     try
     {     {
        String physicalName=_resolvePhysicalName(            String physicalName=_resolvePhysicalName( req_providerModule.getProperty(
           request->providerModule.getProperty(                                                      req_providerModule.findProperty("Location")).getValue().toString());
               request->providerModule.findProperty("Location")).getValue().toString());  
  
        ProviderName name(            ProviderName name(req_provider.getProperty(req_provider.findProperty("Name")).getValue ().toString (),
                request->provider.getProperty(request->provider.findProperty  
                    ("Name")).getValue ().toString (),  
                physicalName,                physicalName,
                request->providerModule.getProperty(request->providerModule.findProperty                                    req_providerModule.getProperty(req_providerModule.findProperty
                     ("InterfaceType")).getValue().toString(),                     ("InterfaceType")).getValue().toString(),
                0);                0);
  
Line 2265 
Line 2266 
  
     OperationResponseHandler handler(request, response);     OperationResponseHandler handler(request, response);
  
           CIMInstance req_provider, req_providerModule;
           ProviderIdContainer pidc = (ProviderIdContainer)request->operationContext.get(ProviderIdContainer::NAME);
   
           req_provider = pidc.getProvider();
           req_providerModule = pidc.getModule();
   
     try     try
     {     {
        String physicalName=_resolvePhysicalName(        String physicalName=_resolvePhysicalName(
               request->providerModule.getProperty(                req_providerModule.getProperty(
                  request->providerModule.findProperty("Location")).getValue().toString());                  req_providerModule.findProperty("Location")).getValue().toString());
  
        ProviderName name(        ProviderName name(
                request->provider.getProperty(request->provider.findProperty                 req_provider.getProperty(req_provider.findProperty
                    ("Name")).getValue ().toString (),                    ("Name")).getValue ().toString (),
                physicalName,                physicalName,
                request->providerModule.getProperty(request->providerModule.findProperty                  req_providerModule.getProperty(req_providerModule.findProperty
                     ("InterfaceType")).getValue().toString(),                     ("InterfaceType")).getValue().toString(),
             0);             0);
   
         // get cached or load new provider module         // get cached or load new provider module
         OpProviderHolder ph =         OpProviderHolder ph =
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);
Line 2327 
Line 2333 
     return(response);     return(response);
 } }
  
 Message * DefaultProviderManager::handleConsumeIndicationRequest(const Message *message)  
 {  
     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, "DefaultProviderManager::handlConsumeIndicationRequest");  
   
     CIMConsumeIndicationRequestMessage *request =  
         dynamic_cast<CIMConsumeIndicationRequestMessage *>(const_cast<Message *>(message));  
   
     PEGASUS_ASSERT(request != 0);  
   
     CIMResponseMessage * response =  
         new CIMResponseMessage(  
         CIM_CONSUME_INDICATION_RESPONSE_MESSAGE,  
         request->messageId,  
         CIMException(),  
         request->queueIds.copyAndPop());  
   
     PEGASUS_ASSERT(response != 0);  
   
     response->setKey(request->getKey());  
   
     //  Set HTTP method in response from request  
     response->setHttpMethod (request->getHttpMethod ());  
   
     Uint32 type = 3;  
   
     try  
     {  
         // resolve provider name  
         ProviderName name = _resolveProviderName(  
             request->operationContext.get(ProviderIdContainer::NAME));  
   
         // get cached or load new provider module  
         OpProviderHolder ph =  
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);  
   
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,  
             "Calling provider.: " +  
             ph.GetProvider().getName());  
   
         OperationContext context;  
   
         //l10n  
         // ATTN-CEC 06/04/03 NOTE: I can't find where the consume msg is sent.  This  
         // does not appear to be hooked-up.  When it is added, need to  
         // make sure that Content-Language is set in the consume msg.  
         // NOTE: A-L is not needed to be set in the consume msg.  
         // add the langs to the context  
         context.insert(ContentLanguageListContainer(request->contentLanguages));  
   
         CIMInstance indication_copy = request->indicationInstance;  
   
         SimpleIndicationResponseHandler handler;  
   
         ph.GetProvider().consumeIndication(context,  
             "",  
             indication_copy);  
     }  
     catch(CIMException & e)  
     {  
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,  
             "Exception: " + e.getMessage());  
   
         response->cimException = CIMException(e);  
     }  
     catch(Exception & e)  
     {  
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,  
             "Exception: " + e.getMessage());  
         //l10n  
         //response->cimException = CIMException(CIM_ERR_FAILED, "Internal Error");  
         response->cimException = CIMException(CIM_ERR_FAILED, MessageLoaderParms(  
             "ProviderManager.DefaultProviderManager.INTERNAL_ERROR",  
             "Internal Error"));  
     }  
     catch(...)  
     {  
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,  
             "Exception: Unknown");  
         //l10n  
         //response->cimException = CIMException(CIM_ERR_FAILED, "Unknown Error");  
         response->cimException = CIMException(CIM_ERR_FAILED, MessageLoaderParms(  
             "ProviderManager.DefaultProviderManager.UNKNOWN_ERROR",  
             "Unknown Error"));  
     }  
   
     PEG_METHOD_EXIT();  
   
     return(response);  
 }  
   
   
 Message *DefaultProviderManager::handleExportIndicationRequest(const Message *message) Message *DefaultProviderManager::handleExportIndicationRequest(const Message *message)
 { {
    PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, "DefaultProviderManagerService::handlExportIndicationRequest");    PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, "DefaultProviderManagerService::handlExportIndicationRequest");
Line 2453 
Line 2368 
         OpProviderHolder ph =         OpProviderHolder ph =
             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);             providerManager.getProvider(name.getPhysicalName(), name.getLogicalName(), String::EMPTY);
  
                   STAT_GETSTARTTIME
   
         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,         PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
                        "Calling provider.: " +                        "Calling provider.: " +
                        ph.GetProvider().getName());                        ph.GetProvider().getName());
Line 2466 
Line 2383 
 // make sure that Content-Language is set in the consume msg. // make sure that Content-Language is set in the consume msg.
 // NOTE: A-L is not needed to be set in the consume msg. // NOTE: A-L is not needed to be set in the consume msg.
       // add the langs to the context       // add the langs to the context
       context.insert(ContentLanguageListContainer(request->contentLanguages));  
         context.insert(request->operationContext.get(ContentLanguageListContainer::NAME));
  
       CIMInstance indication_copy = request->indicationInstance;       CIMInstance indication_copy = request->indicationInstance;
       pm_service_op_lock op_lock(&ph.GetProvider());       pm_service_op_lock op_lock(&ph.GetProvider());
Line 2475 
Line 2393 
                                 request->destinationPath,                                 request->destinationPath,
                                 indication_copy);                                 indication_copy);
  
             STAT_PMS_PROVIDEREND
   
     }     }
  
     catch(CIMException & e)     catch(CIMException & e)
Line 2560 
Line 2480 
             {             {
                 // disable failed since there are pending requests,                 // disable failed since there are pending requests,
                 // stop trying to disable other providers in this module.                 // stop trying to disable other providers in this module.
                 operationalStatus.append(_MODULE_OK);                  operationalStatus.append(CIM_MSE_OPSTATUS_VALUE_OK);
                 break;                 break;
             }             }
             else if (ret_value == 1)  // Success             else if (ret_value == 1)  // Success
Line 2615 
Line 2535 
         // Status is set to OK if a provider was busy         // Status is set to OK if a provider was busy
         if (operationalStatus.size() == 0)         if (operationalStatus.size() == 0)
         {         {
             operationalStatus.append(_MODULE_STOPPED);              operationalStatus.append(CIM_MSE_OPSTATUS_VALUE_STOPPED);
         }         }
     }     }
     else     else
     {     {
         // If exception occurs, module is not stopped         // If exception occurs, module is not stopped
         operationalStatus.append(_MODULE_OK);          operationalStatus.append(CIM_MSE_OPSTATUS_VALUE_OK);
     }     }
  
     CIMDisableModuleResponseMessage * response =     CIMDisableModuleResponseMessage * response =
Line 2652 
Line 2572 
     PEGASUS_ASSERT(request != 0);     PEGASUS_ASSERT(request != 0);
  
     Array<Uint16> operationalStatus;     Array<Uint16> operationalStatus;
     operationalStatus.append(_MODULE_OK);      operationalStatus.append(CIM_MSE_OPSTATUS_VALUE_OK);
  
     CIMEnableModuleResponseMessage * response =     CIMEnableModuleResponseMessage * response =
         new CIMEnableModuleResponseMessage(         new CIMEnableModuleResponseMessage(
Line 2706 
Line 2626 
     const Provider & provider,     const Provider & provider,
     const EnableIndicationsResponseHandler *handler)     const EnableIndicationsResponseHandler *handler)
 { {
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,      PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
         "DefaultProviderManager::_insertEntry");         "DefaultProviderManager::_insertEntry");
  
     String tableKey = _generateKey     String tableKey = _generateKey
Line 2720 
Line 2640 
 EnableIndicationsResponseHandler * DefaultProviderManager::_removeEntry( EnableIndicationsResponseHandler * DefaultProviderManager::_removeEntry(
     const String & key)     const String & key)
 { {
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,      PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
         "DefaultProviderManager::_removeEntry");         "DefaultProviderManager::_removeEntry");
     EnableIndicationsResponseHandler *ret = 0;     EnableIndicationsResponseHandler *ret = 0;
  
Line 2737 
Line 2657 
 { {
     String tableKey;     String tableKey;
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,      PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
         "DefaultProviderManager::_generateKey");         "DefaultProviderManager::_generateKey");
  
     //     //
Line 2759 
Line 2679 
 { {
     String tableKey;     String tableKey;
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,      PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
                       "DefaultProviderManagerService::_generateKey");                       "DefaultProviderManagerService::_generateKey");
  
     //     //
Line 2794 
Line 2714 
         providerId.getModule().findProperty("InterfaceType")).getValue();         providerId.getModule().findProperty("InterfaceType")).getValue();
     genericValue.get(interfaceName);     genericValue.get(interfaceName);
  
     // Check if the provider module is blocked      return ProviderName(providerName, fileName, interfaceName, 0);
     Array<Uint16> operationalStatus;  
     Uint32 pos = providerId.getModule().findProperty(  
         CIMName("OperationalStatus"));  
     PEGASUS_ASSERT(pos != PEG_NOT_FOUND);  
     providerId.getModule().getProperty(pos).getValue().get(operationalStatus);  
   
     for(Uint32 i = 0; i < operationalStatus.size(); i++)  
     {  
         if(operationalStatus[i] == _MODULE_STOPPED ||  
            operationalStatus[i] == _MODULE_STOPPING)  
         {  
             throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED,  
                 MessageLoaderParms(  
                     "ProviderManager.ProviderManagerService.PROVIDER_BLOCKED",  
                     "provider blocked."));  
         }  
     }     }
  
     return ProviderName(providerName, fileName, interfaceName, 0);  Boolean DefaultProviderManager::hasActiveProviders()
   {
       return providerManager.hasActiveProviders();
 } }
  
 void DefaultProviderManager::unload_idle_providers()  void DefaultProviderManager::unloadIdleProviders()
 { {
     providerManager.unload_idle_providers();      providerManager.unloadIdleProviders();
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.30  
changed lines
  Added in v.1.47

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2