qpid::broker::BasicMessage Class Reference

Represents an AMQP message, i.e. More...

#include <BrokerMessage.h>

Inheritance diagram for qpid::broker::BasicMessage:

Inheritance graph
[legend]
Collaboration diagram for qpid::broker::BasicMessage:

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::shared_ptr<
BasicMessage
shared_ptr

Public Member Functions

 BasicMessage (const ConnectionToken *const publisher, const string &exchange, const string &routingKey, bool mandatory, bool immediate, boost::shared_ptr< framing::AMQMethodBody > respondTo)
void setHeader (boost::shared_ptr< framing::AMQHeaderBody > header)
void addContent (framing::AMQContentBody::shared_ptr data)
bool isComplete ()
void deliver (framing::ChannelAdapter &, const string &consumerTag, uint64_t deliveryTag, uint32_t framesize)
void sendGetOk (const framing::MethodContext &, const std::string &destination, uint32_t messageCount, uint64_t deliveryTag, uint32_t framesize)
 Used to return a message in response to a get from a queue.
framing::BasicHeaderProperties * getHeaderProperties ()
const framing::FieldTablegetApplicationHeaders ()
bool isPersistent ()
uint64_t contentSize () const
void decode (framing::Buffer &buffer, bool headersOnly=false, uint32_t contentChunkSize=0)
void decodeHeader (framing::Buffer &buffer)
void decodeContent (framing::Buffer &buffer, uint32_t contentChunkSize=0)
void encode (framing::Buffer &buffer) const
 Encodes the persistable state of this object into the supplied buffer.
void encodeHeader (framing::Buffer &buffer) const
void encodeContent (framing::Buffer &buffer) const
uint32_t encodedSize () const
uint32_t encodedHeaderSize () const
uint32_t encodedContentSize () const
void releaseContent (MessageStore *store)
 Releases the in-memory content data held by this message.
uint64_t expectedContentSize ()
 If headers have been received, returns the expected content size else returns 0.
void setContent (std::auto_ptr< Content > &content)
 Sets the 'content' implementation of this message (the message controls the lifecycle of the content instance it uses).

Detailed Description

Represents an AMQP message, i.e.

a header body, a list of content bodies and some details about the publication request.


Member Function Documentation

uint32_t qpid::broker::BasicMessage::encodedContentSize (  )  const [virtual]

Returns:
the size of the buffer needed to encode the (possibly partial) content held by this message

Implements qpid::broker::Message.

uint32_t qpid::broker::BasicMessage::encodedHeaderSize (  )  const [virtual]

Returns:
the size of the buffer needed to encode the 'header' of this message (not just the header frame, but other meta data e.g.routing key and exchange)

Implements qpid::broker::Message.

uint32_t qpid::broker::BasicMessage::encodedSize (  )  const [virtual]

Returns:
the size of the buffer needed to encode this message in its entirety

Implements qpid::broker::Message.

void qpid::broker::BasicMessage::releaseContent ( MessageStore store  )  [virtual]

Releases the in-memory content data held by this message.

Must pass in a store from which the data can be reloaded.

Reimplemented from qpid::broker::Message.


The documentation for this class was generated from the following file:
Generated on Tue Apr 17 14:22:12 2007 for Qpid by  doxygen 1.4.7