(file) Return to CIMMessage.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CIMMessage.cpp between version 1.24 and 1.33

version 1.24, 2006/06/21 19:57:06 version 1.33, 2008/01/11 19:44:48
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Yi Zhou, Hewlett-Packard Company (yi.zhou@hp.com)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //              John Alex, IBM (johnalex@us.ibm.com) - Bug#2290  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/AutoPtr.h> #include <Pegasus/Common/AutoPtr.h>
   #include <Pegasus/Common/StatisticalData.h>
 #include "CIMMessage.h" #include "CIMMessage.h"
  
 PEGASUS_USING_STD; PEGASUS_USING_STD;
Line 49 
Line 42 
 void CIMResponseMessage::syncAttributes(const CIMRequestMessage* request) void CIMResponseMessage::syncAttributes(const CIMRequestMessage* request)
 { {
     // Propagate request attributes to the response, as necessary     // Propagate request attributes to the response, as necessary
     setKey(request->getKey());  
     setRouting(request->getRouting());  
     setMask(request->getMask());     setMask(request->getMask());
     setHttpMethod(request->getHttpMethod());     setHttpMethod(request->getHttpMethod());
     setCloseConnect(request->getCloseConnect());     setCloseConnect(request->getCloseConnect());
   #ifndef PEGASUS_DISABLE_PERFINST
       setServerStartTime(request->getServerStartTime());
   #endif
 } }
  
 CIMResponseMessage* CIMGetClassRequestMessage::buildResponse() const CIMResponseMessage* CIMGetClassRequestMessage::buildResponse() const
Line 194 
Line 188 
     return response.release();     return response.release();
 } }
  
 CIMResponseMessage* CIMEnumerateInstanceNamesRequestMessage::buildResponse() const  CIMResponseMessage*
       CIMEnumerateInstanceNamesRequestMessage::buildResponse() const
 { {
     AutoPtr<CIMEnumerateInstanceNamesResponseMessage> response(     AutoPtr<CIMEnumerateInstanceNamesResponseMessage> response(
         new CIMEnumerateInstanceNamesResponseMessage(         new CIMEnumerateInstanceNamesResponseMessage(
Line 360 
Line 355 
     return response.release();     return response.release();
 } }
  
 CIMResponseMessage* CIMNotifyProviderRegistrationRequestMessage::buildResponse() const  CIMResponseMessage*
       CIMNotifyProviderRegistrationRequestMessage::buildResponse() const
 { {
     AutoPtr<CIMNotifyProviderRegistrationResponseMessage> response(     AutoPtr<CIMNotifyProviderRegistrationResponseMessage> response(
         new CIMNotifyProviderRegistrationResponseMessage(         new CIMNotifyProviderRegistrationResponseMessage(
Line 371 
Line 367 
     return response.release();     return response.release();
 } }
  
 CIMResponseMessage* CIMNotifyProviderTerminationRequestMessage::buildResponse() const  CIMResponseMessage*
       CIMNotifyProviderTerminationRequestMessage::buildResponse() const
 { {
     AutoPtr<CIMNotifyProviderTerminationResponseMessage> response(     AutoPtr<CIMNotifyProviderTerminationResponseMessage> response(
         new CIMNotifyProviderTerminationResponseMessage(         new CIMNotifyProviderTerminationResponseMessage(
Line 495 
Line 492 
     return response.release();     return response.release();
 } }
  
 CIMResponseMessage* CIMInitializeProviderRequestMessage::buildResponse() const  CIMResponseMessage*
 {      CIMInitializeProviderAgentRequestMessage::buildResponse() const
     AutoPtr<CIMInitializeProviderResponseMessage> response(  
         new CIMInitializeProviderResponseMessage(  
             messageId,  
             CIMException(),  
             queueIds.copyAndPop()));  
     response->syncAttributes(this);  
     return response.release();  
 }  
   
 CIMResponseMessage* CIMInitializeProviderAgentRequestMessage::buildResponse() const  
 { {
     AutoPtr<CIMInitializeProviderAgentResponseMessage> response(     AutoPtr<CIMInitializeProviderAgentResponseMessage> response(
         new CIMInitializeProviderAgentResponseMessage(         new CIMInitializeProviderAgentResponseMessage(
Line 528 
Line 515 
     return response.release();     return response.release();
 } }
  
 CIMMessage::CIMMessage(Uint32 type, const String& messageId_)  CIMMessage::CIMMessage(
     : Message(type), messageId(messageId_)      MessageType type,
       const String& messageId_)
       : Message(type),
         messageId(messageId_),
         _languageContextThreadId(Threads::self())
   #ifndef PEGASUS_DISABLE_PERFINST
         ,_serverStartTimeMicroseconds(0),
         _providerTimeMicroseconds(0),
         _totalServerTimeMicroseconds(0)
   #endif
 { {
     operationContext.insert(     operationContext.insert(
         AcceptLanguageListContainer(AcceptLanguageList()));         AcceptLanguageListContainer(AcceptLanguageList()));
Line 537 
Line 533 
         ContentLanguageListContainer(ContentLanguageList()));         ContentLanguageListContainer(ContentLanguageList()));
 } }
  
   #ifndef PEGASUS_DISABLE_PERFINST
   void CIMMessage::endServer()
   {
       PEGASUS_ASSERT(_serverStartTimeMicroseconds != 0);
   
       _totalServerTimeMicroseconds =
           TimeValue::getCurrentTime().toMicroseconds() -
               _serverStartTimeMicroseconds;
   
       Uint64 serverTimeMicroseconds =
           _totalServerTimeMicroseconds - _providerTimeMicroseconds;
   
       Uint16 statType = (Uint16)((getType() >= CIM_GET_CLASS_RESPONSE_MESSAGE) ?
           getType() - CIM_GET_CLASS_RESPONSE_MESSAGE : getType() - 1);
   
       StatisticalData::current()->addToValue(serverTimeMicroseconds, statType,
           StatisticalData::PEGASUS_STATDATA_SERVER);
   
       StatisticalData::current()->addToValue(_providerTimeMicroseconds, statType,
           StatisticalData::PEGASUS_STATDATA_PROVIDER);
   
       /* This adds the number of bytes read to the total.the request size
          value must be stored (requSize) and passed to the StatisticalData
          object at the end of processingm otherwise it will be the ONLY value
          that is passed to the client which reports the current state of the
          object, not the previous (one command ago) state */
   
       StatisticalData::current()->addToValue(
           StatisticalData::current()->requSize,
           statType,
           StatisticalData::PEGASUS_STATDATA_BYTES_READ);
   }
   #endif
   
 CIMRequestMessage::CIMRequestMessage( CIMRequestMessage::CIMRequestMessage(
     Uint32 type_, const String& messageId_, const QueueIdStack& queueIds_)      MessageType type_,
       const String& messageId_,
       const QueueIdStack& queueIds_)
     : CIMMessage(type_, messageId_), queueIds(queueIds_)     : CIMMessage(type_, messageId_), queueIds(queueIds_)
 { {
 } }
  
 CIMResponseMessage::CIMResponseMessage( CIMResponseMessage::CIMResponseMessage(
     Uint32 type_,      MessageType type_,
     const String& messageId_,     const String& messageId_,
     const CIMException& cimException_,     const CIMException& cimException_,
     const QueueIdStack& queueIds_)     const QueueIdStack& queueIds_)
Line 556 
Line 588 
 } }
  
 CIMOperationRequestMessage::CIMOperationRequestMessage( CIMOperationRequestMessage::CIMOperationRequestMessage(
     Uint32 type_,      MessageType type_,
     const String& messageId_,     const String& messageId_,
     const QueueIdStack& queueIds_,     const QueueIdStack& queueIds_,
     const String& authType_,     const String& authType_,


Legend:
Removed from v.1.24  
changed lines
  Added in v.1.33

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2