(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.25 and 1.26

version 1.25, 2006/02/17 19:20:11 version 1.26, 2006/02/24 19:16:28
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 125 
Line 128 
     ProviderAgentContainer(     ProviderAgentContainer(
         const String & moduleName,         const String & moduleName,
         const String & userName,         const String & userName,
         PEGASUS_INDICATION_CALLBACK indicationCallback,          PEGASUS_INDICATION_CALLBACK_T indicationCallback,
           PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback,
         Boolean subscriptionInitComplete);         Boolean subscriptionInitComplete);
  
     ~ProviderAgentContainer();     ~ProviderAgentContainer();
Line 224 
Line 228 
         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 _indicationCallback;      PEGASUS_INDICATION_CALLBACK_T _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 316 
Line 325 
 ProviderAgentContainer::ProviderAgentContainer( ProviderAgentContainer::ProviderAgentContainer(
     const String & moduleName,     const String & moduleName,
     const String & userName,     const String & userName,
     PEGASUS_INDICATION_CALLBACK indicationCallback,      PEGASUS_INDICATION_CALLBACK_T 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 982 
Line 993 
         //         //
         Semaphore waitSemaphore(0);         Semaphore waitSemaphore(0);
         OutstandingRequestEntry outstandingRequestEntry(         OutstandingRequestEntry outstandingRequestEntry(
             uniqueMessageId, response, &waitSemaphore);              uniqueMessageId, request, response, &waitSemaphore);
  
         //         //
         // Lock the Provider Agent Container while initializing the         // Lock the Provider Agent Container while initializing the
Line 1260 
Line 1271 
                     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 1314 
Line 1348 
 ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
  
 OOPProviderManagerRouter::OOPProviderManagerRouter( OOPProviderManagerRouter::OOPProviderManagerRouter(
     PEGASUS_INDICATION_CALLBACK indicationCallback)      PEGASUS_INDICATION_CALLBACK_T 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 1676 
Line 1712 
     if (!_providerAgentTable.lookup(key, pa))     if (!_providerAgentTable.lookup(key, pa))
     {     {
         pa = new ProviderAgentContainer(         pa = new ProviderAgentContainer(
             moduleName, userName, _indicationCallback,              moduleName, userName, _indicationCallback, _responseChunkCallback,
             _subscriptionInitComplete);             _subscriptionInitComplete);
         _providerAgentTable.insert(key, pa);         _providerAgentTable.insert(key, pa);
     }     }


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2