version 1.84, 2006/09/08 17:25:01
|
version 1.89, 2007/06/06 05:24:49
|
|
|
class PEGASUS_COMMON_LINKAGE MessageMask | class PEGASUS_COMMON_LINKAGE MessageMask |
{ | { |
public: | public: |
// Message type is indicated by the low order 20 bits. For example: |
|
// Uint32 messageType = flags & 0x000fffff; |
|
static Uint32 type_legacy; |
|
static Uint32 type_cimom; |
|
static Uint32 type_service; |
|
|
|
// Message handling is indicated by the high order 12 bits. For example: | // Message handling is indicated by the high order 12 bits. For example: |
// Uint32 messageHandling = flags & 0xfff00000; | // Uint32 messageHandling = flags & 0xfff00000; |
static Uint32 ha_request; | static Uint32 ha_request; |
|
|
(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 |
{ | { |
|
|
Message( | Message( |
Uint32 type, | Uint32 type, |
Uint32 destination = 0, | Uint32 destination = 0, |
Uint32 mask = MessageMask::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), | _serverStartTimeMicroseconds(0), |
_providerTimeMicroseconds(0), | _providerTimeMicroseconds(0), |
_totalServerTimeMicroseconds(0), | _totalServerTimeMicroseconds(0), |
|
#endif |
_close_connect(false), | _close_connect(false), |
_last_thread_id(Threads::self()), | _last_thread_id(Threads::self()), |
_async(0), | _async(0), |
|
|
_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; |
|
_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) |
{ | { |
|
|
| |
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 |
|
|
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) |
|
|
} | } |
| |
// << 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())) |
{ | { |
|
|
// 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; } |
|
|
Uint32 _mask; | Uint32 _mask; |
HttpMethod _httpMethod; | HttpMethod _httpMethod; |
| |
|
#ifndef PEGASUS_DISABLE_PERFINST |
// Needed for performance measurement | // Needed for performance measurement |
Uint64 _serverStartTimeMicroseconds; | Uint64 _serverStartTimeMicroseconds; |
Uint64 _providerTimeMicroseconds; | Uint64 _providerTimeMicroseconds; |
Uint64 _totalServerTimeMicroseconds; | Uint64 _totalServerTimeMicroseconds; |
|
#endif |
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 |
|
|
public: | public: |
Message *_async; | Message *_async; |
Uint32 dest; | Uint32 dest; |
//needed for PEP 128 - transmitting Server Response Time to Client |
|
| |
private: | private: |
|
Message& operator=(const Message& msg); |
|
|
Boolean _isComplete; | Boolean _isComplete; |
Uint32 _index; | Uint32 _index; |
|
|
friend class cimom; |
|
friend class MessageQueueService; |
|
friend class AsyncLegacyOperationStart; |
|
friend class AsyncLegacyOperationResult; |
|
|
|
}; | }; |
| |
| |
|
|
| |
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() |
{ | { |