Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

qpid::messaging::Address Class Reference

Represents an address to which messages can be sent and from which messages can be received. More...

#include <qpid/messaging/Address.h>

List of all members.

Public Member Functions

 Address ()
 Address (const std::string &address)
 Address (const std::string &name, const std::string &subject, const Variant::Map &options, const std::string &type="")
 Address (const Address &address)
 ~Address ()
Addressoperator= (const Address &)
const std::string & getName () const
void setName (const std::string &)
const std::string & getSubject () const
void setSubject (const std::string &)
bool hasSubject () const
const Variant::MapgetOptions () const
Variant::MapgetOptions ()
void setOptions (const Variant::Map &)
std::string getType () const
void setType (const std::string &)
const VariantgetOption (const std::string &key) const
std::string toStr () const
 operator bool () const
bool operator! () const

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-properties option (see below).

assert

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

delete

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

node-properties

A nested map of properties of the addressed entity or 'node'. These can be used when automatically creating it, or to assert certain properties.

The valid node-properties are:

  • type - queue or topic

  • durable - true or false

  • x-properties - a nested map that can contain implementation or protocol specifiec extedned properties. For the amqp 0-10 mapping, the fields in queue- or exchange- declare can be specified in here; anything that is not recognised as one of those will be passed through in the arguments field.,/li>

For receivers there are some further options of interest:

no-local

(only relevant for topics at present) specifies that the receiver does not want to receiver messages published to the topic that originate from a sender on the same connection

browse

(only relevant for queues) specifies that the receiver does not wish to consume the messages, but merely browse them

durable

(only relevant for topics at present) specifies that a durable subscription is required

reliability

indicates the level of reliability that the receiver expects. Can be one of unreliable, at-most-once, at-least-once or exactly-once (the latter is not yet correctly supported).

filter

(only relevant for topics at present) allows bindings to be created for the queue that match the given criteris (or list of criteria).

x-properties

allows protocol or implementation specific options to be specified for a receiver; this is a nested map and currently the implementation only recognises two specific nested properties within it (all others are passed through in the arguments of the message-subscribe command):

  • exclusive, which requests an exclusive subscription and is only relevant for queues

  • x-queue-arguments, which ais only relevant for topics and allows arguments to the queue-declare for the subscription queue to be specified

Definition at line 141 of file Address.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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

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

Qpid C++ API Reference
Generated on Tue May 4 14:28:25 2010 for Qpid C++ Client API by doxygen 1.6.2-20100208