qpid::client::FailoverListener 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 | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions
qpid::client::FailoverListener Class Reference

Listen for updates from the amq.failover exchange. More...

`#include <qpid/client/FailoverListener.h>`

List of all members.

## Public Member Functions
| FailoverListener (Connection)
| Subscribe to amq.failover exchange.
| FailoverListener (Connection, bool useInitial)
| Subscribe to amq.failover exchange.
| ~FailoverListener ()
std::vector< Url > | getKnownBrokers () const
| Returns the latest list of known broker URLs.
## Static Public Member Functions
static std::vector< Url > | getKnownBrokers (const Message &m)
| Extract the broker list from a failover exchange message.
## Static Public Attributes
static const std::string | AMQ_FAILOVER
| The name of the standard failover exchange amq.failover.
## Private Types
typedef boost::function0< void > | Functor
| Type to represent a runnable as a Functor.
## Private Member Functions
Functor | functor ()
| Create a functor object that will call this->run().

## Detailed Description

Listen for updates from the amq.failover exchange.

In a cluster, the amq.failover exchange provides updates whenever the cluster membership changes. This class subscribes to the failover exchange and providees the latest list of known brokers.

You can also subscribe to amq.failover yourself and use FailoverListener::decode to extract a list of broker URLs from a failover exchange message.

## Constructor & Destructor Documentation

qpid::client::FailoverListener::FailoverListener | ( | Connection |  | ) |

Subscribe to amq.failover exchange.

qpid::client::FailoverListener::FailoverListener | ( | Connection | ,
|  | bool | useInitial
| ) |  |

Subscribe to amq.failover exchange.

Parameters:

  useInitial | If true use the connection's initial brokers as the initial value of getKnownBrokers

qpid::client::FailoverListener::~FailoverListener | ( |  | ) |

## Member Function Documentation

static std::vector<Url> qpid::client::FailoverListener::getKnownBrokers | ( | const Message & | m | ) | `[static]`

Extract the broker list from a failover exchange message.

std::vector<Url> qpid::client::FailoverListener::getKnownBrokers | ( |  | ) | const

Returns the latest list of known broker URLs.

## Member Data Documentation

const std::string qpid::client::FailoverListener::AMQ_FAILOVER`[static]`

The name of the standard failover exchange amq.failover.

Definition at line 55 of file FailoverListener.h.

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

- qpid/client/FailoverListener.h