qpid::messaging::Address Class Reference

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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
qpid::messaging::Address Class Reference
Qpid C++ Client API

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 qpid::types::Variant::Map &options, const std::string &type="")
| Address (const Address &address)
| ~Address ()
Address & | operator= (const Address &)
const std::string & | getName () const
void | setName (const std::string &)
const std::string & | getSubject () const
void | setSubject (const std::string &)
const qpid::types::Variant::Map & | getOptions () const
qpid::types::Variant::Map & | getOptions ()
void | setOptions (const qpid::types::Variant::Map &)
std::string | getType () const
void | setType (const std::string &)
| The type of and addressed node influences how receivers and senders are constructed for it.
std::string | str () 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 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::Address::Address | ( |  | ) |

qpid::messaging::Address::Address | ( | const std::string & | address | ) |

qpid::messaging::Address::Address | ( | const std::string & | name,
|  | const std::string & | subject,
|  | const qpid::types::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 qpid::types::Variant::Map& qpid::messaging::Address::getOptions | ( |  | ) | const

qpid::types::Variant::Map& qpid::messaging::Address::getOptions | ( |  | ) |

const std::string& qpid::messaging::Address::getSubject | ( |  | ) | const

std::string qpid::messaging::Address::getType | ( |  | ) | 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 qpid::types::Variant::Map & |  | ) |

void qpid::messaging::Address::setSubject | ( | const std::string & |  | ) |

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.

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

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

- qpid/messaging/Address.h