qpid::broker::Message Class Reference

Base class for all types of internal broker messages abstracting away the operations TODO; AMS: for the moment this is mostly a placeholder. More...

#include <BrokerMessageBase.h>

Inheritance diagram for qpid::broker::Message:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::shared_ptr<
Message
shared_ptr
typedef boost::shared_ptr<
framing::AMQMethodBody > 
AMQMethodBodyPtr

Public Member Functions

 Message (const ConnectionToken *publisher_, const std::string &_exchange, const std::string &_routingKey, bool _mandatory, bool _immediate, AMQMethodBodyPtr respondTo_)
const std::string & getRoutingKey () const
const std::string & getExchange () const
uint64_t getPersistenceId () const
 Returns any identifier the store may have attached to this object.
bool getRedelivered () const
AMQMethodBodyPtr getRespondTo () const
void setRouting (const std::string &_exchange, const std::string &_routingKey)
void setPersistenceId (uint64_t _persistenceId) const
 Allows the store to attach its own identifier to this object.
void redeliver ()
virtual void deliver (framing::ChannelAdapter &channel, const std::string &consumerTag, uint64_t deliveryTag, uint32_t framesize)=0
 Used to deliver the message from the queue.
virtual void sendGetOk (const framing::MethodContext &context, const std::string &destination, uint32_t messageCount, uint64_t deliveryTag, uint32_t framesize)=0
 Used to return a message in response to a get from a queue.
virtual bool isComplete ()=0
virtual uint64_t contentSize () const =0
virtual framing::BasicHeaderProperties * getHeaderProperties ()=0
virtual const framing::FieldTablegetApplicationHeaders ()=0
virtual bool isPersistent ()=0
virtual const ConnectionTokengetPublisher () const
virtual void encode (framing::Buffer &buffer) const =0
 Encodes the persistable state of this object into the supplied buffer.
virtual void encodeHeader (framing::Buffer &buffer) const =0
virtual uint32_t encodedSize () const =0
virtual uint32_t encodedHeaderSize () const =0
virtual uint32_t encodedContentSize () const =0
virtual uint64_t expectedContentSize ()=0
 If headers have been received, returns the expected content size else returns 0.
virtual void decodeHeader (framing::Buffer &buffer)=0
virtual void decodeContent (framing::Buffer &buffer, uint32_t contentChunkSize=0)=0
virtual void setContent (std::auto_ptr< Content > &)
 Sets the 'content' implementation of this message (the message controls the lifecycle of the content instance it uses).
virtual void setHeader (boost::shared_ptr< framing::AMQHeaderBody >)
virtual void addContent (boost::shared_ptr< framing::AMQContentBody >)
virtual void releaseContent (MessageStore *)
 Releases the in-memory content data held by this message.

Static Public Member Functions

static shared_ptr decode (framing::Buffer &buffer)

Detailed Description

Base class for all types of internal broker messages abstracting away the operations TODO; AMS: for the moment this is mostly a placeholder.


Member Function Documentation

virtual uint32_t qpid::broker::Message::encodedContentSize (  )  const [pure virtual]

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

Implemented in qpid::broker::BasicMessage.

virtual uint32_t qpid::broker::Message::encodedHeaderSize (  )  const [pure 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::PersistableMessage.

Implemented in qpid::broker::BasicMessage.

virtual uint32_t qpid::broker::Message::encodedSize (  )  const [pure virtual]

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

Implements qpid::broker::Persistable.

Implemented in qpid::broker::BasicMessage.

virtual void qpid::broker::Message::releaseContent ( MessageStore  )  [inline, virtual]

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

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

Reimplemented in qpid::broker::BasicMessage.


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