AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.3
AMPS::MessageImpl Class Reference

Implementation class for a Message. More...

#include <Message.hpp>

Inherits RefBody.

Public Member Functions

 MessageImpl (amps_handle message_, bool owner_=false, bool ignoreAutoAck_=false, size_t bookmarkSeqNo_=0, amps_subscription_handle subscription_=NULL, ClientImpl *clientImpl_=NULL)
 Constructs a messageImpl from an existing AMPS message. More...
 
 MessageImpl ()
 Constructs a MessageImpl with a new, empty AMPS message.
 
amps_handle getMessage () const
 Returns the underling AMPS message object from the C layer.
 
void replace (amps_handle message_, bool owner_=false)
 Causes self to refer to a new AMPS message, freeing any current message owned by self along the way. More...
 

Detailed Description

Implementation class for a Message.

Holds an amps_handle with the real body and storage for the message.

Constructor & Destructor Documentation

AMPS::MessageImpl::MessageImpl ( amps_handle  message_,
bool  owner_ = false,
bool  ignoreAutoAck_ = false,
size_t  bookmarkSeqNo_ = 0,
amps_subscription_handle  subscription_ = NULL,
ClientImpl *  clientImpl_ = NULL 
)
inline

Constructs a messageImpl from an existing AMPS message.

The owner flag tells us if we own the message and should destroy it when done or not.

Parameters
message_The AMPS message to use.
owner_If we own the memory of the message_.
ignoreAutoAck_If we own the memory of the message_.
bookmarkSeqNo_The sequence number in the bookmark store.
subscription_The handle of the subscription where message was logged.
clientImpl_The client creating the message, used for automatic queue acking.

Member Function Documentation

void AMPS::MessageImpl::replace ( amps_handle  message_,
bool  owner_ = false 
)
inline

Causes self to refer to a new AMPS message, freeing any current message owned by self along the way.

Parameters
message_The new AMPS message to use.
owner_If this MessageImpl owns the memory of message_.

The documentation for this class was generated from the following file: