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

Diff for /pegasus/src/Pegasus/ProviderManager2/Attic/OOPProviderManagerRouter.cpp between version 1.22.2.2 and 1.25

version 1.22.2.2, 2006/03/07 18:45:56 version 1.25, 2006/02/17 19:20:11
Line 98 
Line 98 
 public: public:
     OutstandingRequestEntry(     OutstandingRequestEntry(
         String messageId_,         String messageId_,
         CIMRequestMessage* requestMessage_,  
         CIMResponseMessage*& responseMessage_,         CIMResponseMessage*& responseMessage_,
         Semaphore* responseReady_)         Semaphore* responseReady_)
         : messageId(messageId_),         : messageId(messageId_),
           requestMessage(requestMessage_),  
           responseMessage(responseMessage_),           responseMessage(responseMessage_),
           responseReady(responseReady_)           responseReady(responseReady_)
     {     {
     }     }
  
     String messageId;     String messageId;
     CIMRequestMessage* requestMessage;  
     CIMResponseMessage*& responseMessage;     CIMResponseMessage*& responseMessage;
     Semaphore* responseReady;     Semaphore* responseReady;
 }; };
Line 128 
Line 125 
     ProviderAgentContainer(     ProviderAgentContainer(
         const String & moduleName,         const String & moduleName,
         const String & userName,         const String & userName,
         PEGASUS_INDICATION_CALLBACK_T indicationCallback,          PEGASUS_INDICATION_CALLBACK indicationCallback,
         PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback,  
         Boolean subscriptionInitComplete);         Boolean subscriptionInitComplete);
  
     ~ProviderAgentContainer();     ~ProviderAgentContainer();
Line 228 
Line 224 
         Callback function to which all generated indications are sent for         Callback function to which all generated indications are sent for
         processing.         processing.
      */      */
     PEGASUS_INDICATION_CALLBACK_T _indicationCallback;      PEGASUS_INDICATION_CALLBACK _indicationCallback;
   
     /**  
         Callback function to which response chunks are sent for processing.  
      */  
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T _responseChunkCallback;  
  
     /**     /**
         Indicates whether the Provider Agent is active.         Indicates whether the Provider Agent is active.
Line 325 
Line 316 
 ProviderAgentContainer::ProviderAgentContainer( ProviderAgentContainer::ProviderAgentContainer(
     const String & moduleName,     const String & moduleName,
     const String & userName,     const String & userName,
     PEGASUS_INDICATION_CALLBACK_T indicationCallback,      PEGASUS_INDICATION_CALLBACK indicationCallback,
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback,  
     Boolean subscriptionInitComplete)     Boolean subscriptionInitComplete)
     : _moduleName(moduleName),     : _moduleName(moduleName),
       _userName(userName),       _userName(userName),
       _indicationCallback(indicationCallback),       _indicationCallback(indicationCallback),
       _responseChunkCallback(responseChunkCallback),  
       _isInitialized(false),       _isInitialized(false),
       _subscriptionInitComplete(subscriptionInitComplete)       _subscriptionInitComplete(subscriptionInitComplete)
 { {
Line 993 
Line 982 
         //         //
         Semaphore waitSemaphore(0);         Semaphore waitSemaphore(0);
         OutstandingRequestEntry outstandingRequestEntry(         OutstandingRequestEntry outstandingRequestEntry(
             uniqueMessageId, request, response, &waitSemaphore);              uniqueMessageId, response, &waitSemaphore);
  
         //         //
         // Lock the Provider Agent Container while initializing the         // Lock the Provider Agent Container while initializing the
Line 1271 
Line 1260 
                     reinterpret_cast<CIMProcessIndicationRequestMessage*>(                     reinterpret_cast<CIMProcessIndicationRequestMessage*>(
                         message));                         message));
             }             }
             else if (!message->isComplete())  
             {  
                 CIMResponseMessage* response;  
                 response = dynamic_cast<CIMResponseMessage*>(message);  
                 PEGASUS_ASSERT(response != 0);  
   
                 // Get the OutstandingRequestEntry for this response chunk  
                 OutstandingRequestEntry* _outstandingRequestEntry = 0;  
                 {  
                     AutoMutex tableLock(_outstandingRequestTableMutex);  
                     Boolean foundEntry = _outstandingRequestTable.lookup(  
                         response->messageId, _outstandingRequestEntry);  
                     PEGASUS_ASSERT(foundEntry);  
                 }  
   
                 // Put the original message ID into the response  
                 response->messageId =  
                     _outstandingRequestEntry->requestMessage->messageId;  
   
                 // Call the response chunk callback to process the chunk  
                 _responseChunkCallback(  
                     _outstandingRequestEntry->requestMessage, response);  
             }  
             else             else
             {             {
                 CIMResponseMessage* response;                 CIMResponseMessage* response;
Line 1348 
Line 1314 
 ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
  
 OOPProviderManagerRouter::OOPProviderManagerRouter( OOPProviderManagerRouter::OOPProviderManagerRouter(
     PEGASUS_INDICATION_CALLBACK_T indicationCallback,      PEGASUS_INDICATION_CALLBACK indicationCallback)
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)  
 { {
     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
         "OOPProviderManagerRouter::OOPProviderManagerRouter");         "OOPProviderManagerRouter::OOPProviderManagerRouter");
  
     _indicationCallback = indicationCallback;     _indicationCallback = indicationCallback;
     _responseChunkCallback = responseChunkCallback;  
     _subscriptionInitComplete = false;     _subscriptionInitComplete = false;
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 1712 
Line 1676 
     if (!_providerAgentTable.lookup(key, pa))     if (!_providerAgentTable.lookup(key, pa))
     {     {
         pa = new ProviderAgentContainer(         pa = new ProviderAgentContainer(
             moduleName, userName, _indicationCallback, _responseChunkCallback,              moduleName, userName, _indicationCallback,
             _subscriptionInitComplete);             _subscriptionInitComplete);
         _providerAgentTable.insert(key, pa);         _providerAgentTable.insert(key, pa);
     }     }


Legend:
Removed from v.1.22.2.2  
changed lines
  Added in v.1.25

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2