Qpid C++ Messaging API  0.22
qpid::messaging::Address Class Reference

#include <Address.h>

List of all members.

Public Member Functions

QPID_MESSAGING_EXTERN Address ()
QPID_MESSAGING_EXTERN Address (const std::string &address)
QPID_MESSAGING_EXTERN Address (const std::string &name, const std::string &subject, const qpid::types::Variant::Map &options, const std::string &type="")
QPID_MESSAGING_EXTERN Address (const Address &address)
QPID_MESSAGING_EXTERN ~Address ()
QPID_MESSAGING_EXTERN Addressoperator= (const Address &)
QPID_MESSAGING_EXTERN const
std::string & 
getName () const
QPID_MESSAGING_EXTERN void setName (const std::string &)
QPID_MESSAGING_EXTERN const
std::string & 
getSubject () const
QPID_MESSAGING_EXTERN void setSubject (const std::string &)
QPID_MESSAGING_EXTERN const
qpid::types::Variant::Map
getOptions () const
QPID_MESSAGING_EXTERN
qpid::types::Variant::Map
getOptions ()
QPID_MESSAGING_EXTERN void setOptions (const qpid::types::Variant::Map &)
QPID_MESSAGING_EXTERN std::string getType () const
QPID_MESSAGING_EXTERN void setType (const std::string &)
QPID_MESSAGING_EXTERN std::string str () const
QPID_MESSAGING_EXTERN operator bool () const
QPID_MESSAGING_EXTERN bool operator! () const

Friends

class AddressImpl

Detailed Description

Represents an address to which messages can be sent and from which messages can be received. Often a simple name is sufficient for this, however this can be augmented with a subject pattern and options.

All parts of an address can be specified in a string of the following form:

<address> [ / <subject> ] ; [ { <key> : <value> , ... } ]

Here the <address> is a simple name for the addressed entity and <subject> is a subject or subject pattern for messages sent to or received from this address. The options are specified as a series of key value pairs enclosed in curly brackets (denoting a map). Values can be nested maps, or lists (which are denoted as a comma separated list of values inside square brackets, e.g. [a, b, c]).

The currently supported options are as follows:

create

Indicate whether the address should be automatically created or not. Can be one of always, never, sender or receiver. The properties of the node to be created can be specified via the node options (see below).

assert

Indicate whether or not to assert any specified node properties(see below) match the address. Can be one of always, never, sender or receiver.

delete

Indicate whether or not to delete the addressed node when a sender or receiver is cancelled. Can be one of always, never, sender or receiver.

node

A nested map describing properties of the addressed node. Current properties supported are type (topic or queue), durable (boolean), x-declare and x-bindings. The x-declare option is a nested map in whcih protocol amqp 0-10 specific options for queue or exchange declare can be specified. The x-bindings option is a nested list, each element of which can specify a queue, an exchange, a binding-key and arguments, which are used to establish a binding on create. The node will be used if queue or exchange values are not specified.

link

A nested map through which properties of the 'link' from sender/receiver to node can be configured. Current propeties are name, durable, realiability, x-declare, x-subscribe and x-bindings.

For receivers there is one other option of interest:

mode(only relevant for queues) indicates whether the subscribe should consume (the default) or merely browse the messages. Valid values are 'consume' and 'browse'

An address has value semantics.


Constructor & Destructor Documentation

QPID_MESSAGING_EXTERN qpid::messaging::Address::Address ( )
QPID_MESSAGING_EXTERN qpid::messaging::Address::Address ( const std::string &  address)
QPID_MESSAGING_EXTERN qpid::messaging::Address::Address ( const std::string &  name,
const std::string &  subject,
const qpid::types::Variant::Map options,
const std::string &  type = "" 
)
QPID_MESSAGING_EXTERN qpid::messaging::Address::Address ( const Address address)
QPID_MESSAGING_EXTERN qpid::messaging::Address::~Address ( )

Member Function Documentation

QPID_MESSAGING_EXTERN const std::string& qpid::messaging::Address::getName ( ) const
QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& qpid::messaging::Address::getOptions ( ) const
QPID_MESSAGING_EXTERN qpid::types::Variant::Map& qpid::messaging::Address::getOptions ( )
QPID_MESSAGING_EXTERN const std::string& qpid::messaging::Address::getSubject ( ) const
QPID_MESSAGING_EXTERN std::string qpid::messaging::Address::getType ( ) const
QPID_MESSAGING_EXTERN qpid::messaging::Address::operator bool ( ) const
QPID_MESSAGING_EXTERN bool qpid::messaging::Address::operator! ( ) const
QPID_MESSAGING_EXTERN Address& qpid::messaging::Address::operator= ( const Address )
QPID_MESSAGING_EXTERN void qpid::messaging::Address::setName ( const std::string &  )
QPID_MESSAGING_EXTERN void qpid::messaging::Address::setOptions ( const qpid::types::Variant::Map )
QPID_MESSAGING_EXTERN void qpid::messaging::Address::setSubject ( const std::string &  )
QPID_MESSAGING_EXTERN void qpid::messaging::Address::setType ( const std::string &  )

The type of and addressed node influences how receivers and senders are constructed for it. It also affects how a reply-to address is encoded. If the type is not specified in the address itself, it will be automatically determined by querying the broker. The type can be explicitly set to prevent this if needed.

QPID_MESSAGING_EXTERN std::string qpid::messaging::Address::str ( ) const

Friends And Related Function Documentation

friend class AddressImpl [friend]

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