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

Diff for /pegasus/src/Pegasus/Common/Message.h between version 1.81 and 1.89

version 1.81, 2006/08/22 18:29:36 version 1.89, 2007/06/06 05:24:49
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //              Mike Day (mdday@us.ibm.com)  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Arthur Pichlkostner (via Markus: sedgewick_de@yahoo.de)  
 //                              Willis White (whiwill@us.ibm.com) PEP 127 and 128  
 //         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1  
 //              Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090  
 //              John Alex, IBM (johnalex@us.ibm.com) - Bug#2290  
 //  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Message_h #ifndef Pegasus_Message_h
Line 60 
Line 46 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 // REVIEW: could class be renamed to MessageMask (coding standard)  class PEGASUS_COMMON_LINKAGE MessageMask
   
 class PEGASUS_COMMON_LINKAGE message_mask  
 { {
    public:    public:
       // Message handling is indicated by the high order 12 bits.  For example:
       static Uint32 type_legacy;      // Uint32 messageHandling = flags & 0xfff00000;
       static Uint32 type_CIMOperation;  
       static Uint32 type_CIMAsyncOperation;  
       static Uint32 type_export;  
       static Uint32 type_lifetime;  
       static Uint32 type_socket;  
       static Uint32 type_connection;  
       static Uint32 type_http;  
       static Uint32 type_http_error;  
       static Uint32 type_cimom;  
       static Uint32 type_control;  
       static Uint32 type_service;  
       static Uint32 type_broadcast;  
       static Uint32 type_client_exception;  
   
       static Uint32 ha_no_delete;  
       static Uint32 ha_request;       static Uint32 ha_request;
       static Uint32 ha_reply;       static Uint32 ha_reply;
       static Uint32 ha_synchronous;  
       static Uint32 ha_async;       static Uint32 ha_async;
       static Uint32 ha_wait;  
   
   
       // more for documentation than for use  
   
       inline Uint32 get_type(Uint32 flags)  
       {  
          return (flags & 0x000fffff);  
       }  
   
       inline Uint32 get_handling(Uint32 flags)  
       {  
          return( flags & 0xfff00000);  
       }  
 }; };
  
 class cimom;  
 class MessageQueue;  
 class MessageQueueService;  
 class AsyncLegacyOperationStart;  
 class AsyncLegacyOperationResult;  
   
 enum HttpMethod enum HttpMethod
 { {
     HTTP_METHOD__POST,     HTTP_METHOD__POST,
Line 119 
Line 67 
     (see MessageQueue class). Derived classes may add their own fields.     (see MessageQueue class). Derived classes may add their own fields.
     This base class defines a common type field, which is the type of     This base class defines a common type field, which is the type of
     the message.     the message.
   
     The Message class also provides previous and next pointers which are  
     used to place the messages on a queue by the MessageQueue class.  
 */ */
 class PEGASUS_COMMON_LINKAGE Message : public Linkable class PEGASUS_COMMON_LINKAGE Message : public Linkable
 { {
Line 130 
Line 75 
       Message(       Message(
          Uint32 type,          Uint32 type,
          Uint32 destination = 0,          Uint32 destination = 0,
          Uint32 mask = message_mask::type_legacy)          Uint32 mask = 0)
          :          :
          _type(type),          _type(type),
          _mask(mask),          _mask(mask),
          _httpMethod (HTTP_METHOD__POST),          _httpMethod (HTTP_METHOD__POST),
   #ifndef PEGASUS_DISABLE_PERFINST
           _serverStartTimeMicroseconds(0),
           _providerTimeMicroseconds(0),
           _totalServerTimeMicroseconds(0),
   #endif
          _close_connect(false),          _close_connect(false),
         _last_thread_id(Threads::self()),         _last_thread_id(Threads::self()),
          _next(0),  
          _prev(0),  
          _async(0),          _async(0),
          dest(destination),          dest(destination),
          _isComplete(true),          _isComplete(true),
          _index(0)          _index(0)
       {       {
   
       }       }
  
       Message & operator = ( const Message & msg)      virtual ~Message();
       {  
          if (this != &msg)  
          {  
             _type = msg._type;  
             _mask = msg._mask;  
             _last_thread_id = msg._last_thread_id;  
             _next = _prev = _async = 0;  
             dest = msg.dest;  
                         _httpMethod = msg._httpMethod;  
                         _index = msg._index;  
                         _isComplete = msg._isComplete;  
   
          }  
          return *this;  
       }  
  
       // NOTE: The compiler default implementation of the copy constructor
       // is used for this class.
  
       virtual ~Message();  
       Boolean getCloseConnect() const { return _close_connect; }       Boolean getCloseConnect() const { return _close_connect; }
       void setCloseConnect(Boolean close_connect)       void setCloseConnect(Boolean close_connect)
       {       {
Line 184 
Line 117 
  
       void setHttpMethod(HttpMethod httpMethod) {_httpMethod = httpMethod;}       void setHttpMethod(HttpMethod httpMethod) {_httpMethod = httpMethod;}
  
   
 #ifndef PEGASUS_DISABLE_PERFINST #ifndef PEGASUS_DISABLE_PERFINST
 // //
 // Needed for performance measurement // Needed for performance measurement
 // //
  
       void startServer();      Uint64 getServerStartTime() const
       {
       void endServer();          return _serverStartTimeMicroseconds;
       }
       void startProvider();  
   
       void endProvider();  
   
       TimeValue getStartServerTime() const { return _timeServerStart; }  
  
       void setStartServerTime(TimeValue timeServerStart)      void setServerStartTime(Uint64 serverStartTimeMicroseconds)
       {       {
            _timeServerStart = timeServerStart;           _serverStartTimeMicroseconds = serverStartTimeMicroseconds;
       }       }
  
       TimeValue getStartProviderTime() const { return _timeProviderStart; }      void endServer();
  
       void setStartProviderTime(TimeValue timeProviderStart)      Uint64 getProviderTime() const
       {       {
           _timeProviderStart = timeProviderStart;          return _providerTimeMicroseconds;
       }       }
  
       TimeValue getEndServerTime() const { return _timeServerEnd; }      void setProviderTime(Uint64 providerTimeMicroseconds)
   
       void setEndServerTime (TimeValue timeServerEnd)  
       {       {
           _timeServerEnd = timeServerEnd;          _providerTimeMicroseconds = providerTimeMicroseconds;
       }       }
  
       TimeValue getEndProviderTime() const { return _timeProviderEnd; }      Uint64 getTotalServerTime() const
       {
           return _totalServerTimeMicroseconds;
       }
  
       void setEndProviderTime(TimeValue timeProviderEnd)      void setTotalServerTime(Uint64 totalServerTimeMicroseconds)
       {       {
           _timeProviderEnd = timeProviderEnd;          _totalServerTimeMicroseconds = totalServerTimeMicroseconds;
       }       }
  
           TimeValue getServerTime() { return _serverTime; }  
 //  
 #endif #endif
  
       Message* getNext() { return _next; }  
   
       const Message* getNext() const { return _next; }  
   
       Message* getPrevious() { return _prev; }  
   
       const Message* getPrevious() const { return _prev; }  
   
       static CIMOperationType convertMessageTypetoCIMOpType(Uint32 type);       static CIMOperationType convertMessageTypetoCIMOpType(Uint32 type);
  
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
Line 246 
Line 164 
           Boolean printHeader = true) const;           Boolean printHeader = true) const;
 #endif #endif
  
       Message *get_async(void)      Message* get_async()
       {       {
          Message *ret = _async;          Message *ret = _async;
          _async = 0;          _async = 0;
          return ret;          return ret;
   
       }       }
  
       void put_async(Message * msg)       void put_async(Message * msg)
Line 260 
Line 177 
       }       }
  
       // << Tue Jul  1 11:02:49 2003 mdd >> pep_88 and helper for i18n and l10n       // << Tue Jul  1 11:02:49 2003 mdd >> pep_88 and helper for i18n and l10n
       Boolean thread_changed(void)      Boolean thread_changed()
       {       {
          if (!Threads::equal(_last_thread_id, Threads::self()))          if (!Threads::equal(_last_thread_id, Threads::self()))
          {          {
Line 281 
Line 198 
                         // set the complete flag indicating if this message piece is the                         // set the complete flag indicating if this message piece is the
                         // last or not                         // last or not
                         void setComplete(Boolean isComplete)                         void setComplete(Boolean isComplete)
                                 { _isComplete = isComplete ? true:false; }      {
           _isComplete = isComplete ? true:false;
       }
  
                         // get the message index (or sequence number)                         // get the message index (or sequence number)
                         Uint32 getIndex() const { return _index; }                         Uint32 getIndex() const { return _index; }
Line 296 
Line 215 
       Uint32 _type;       Uint32 _type;
       Uint32 _mask;       Uint32 _mask;
       HttpMethod _httpMethod;       HttpMethod _httpMethod;
   
   #ifndef PEGASUS_DISABLE_PERFINST
 // Needed for performance measurement // Needed for performance measurement
       TimeValue _timeServerStart;      Uint64 _serverStartTimeMicroseconds;
       TimeValue _timeServerEnd;      Uint64 _providerTimeMicroseconds;
       TimeValue _timeProviderStart;      Uint64 _totalServerTimeMicroseconds;
       TimeValue _timeProviderEnd;  #endif
           TimeValue _serverTime;  
       Boolean   _close_connect;       Boolean   _close_connect;
  
 //  
   
       // << Tue Jul  1 11:02:35 2003 mdd >> pep_88 and helper for i18n and l10n       // << Tue Jul  1 11:02:35 2003 mdd >> pep_88 and helper for i18n and l10n
       ThreadType _last_thread_id;       ThreadType _last_thread_id;
  
       Message* _next;  
       Message* _prev;  
   
    protected:  
   
    public:    public:
       Message *_async;       Message *_async;
       Uint32 dest;       Uint32 dest;
           //needed for PEP 128 - transmitting Server Response Time to Client  
       Uint64 totServerTime;  
  
    private:    private:
       MessageQueue* _owner;      Message& operator=(const Message& msg);
   
       Boolean _isComplete;       Boolean _isComplete;
       Uint32 _index;       Uint32 _index;
   
       friend class cimom;  
       friend class MessageQueue;  
       friend class MessageQueueService;  
       friend class AsyncLegacyOperationStart;  
       friend class AsyncLegacyOperationResult;  
   
 }; };
  
  
Line 493 
Line 398 
  
     QueueIdStack(const QueueIdStack& x);     QueueIdStack(const QueueIdStack& x);
  
     PEGASUS_EXPLICIT QueueIdStack(Uint32 x);      explicit QueueIdStack(Uint32 x);
  
     PEGASUS_EXPLICIT QueueIdStack(Uint32 x1, Uint32 x2);      explicit QueueIdStack(Uint32 x1, Uint32 x2);
  
     ~QueueIdStack()     ~QueueIdStack()
     {     {


Legend:
Removed from v.1.81  
changed lines
  Added in v.1.89

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2