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

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 ()
std::vector< UrlgetKnownBrokers () const
 Returns the latest list of known broker URLs.

Static Public Member Functions

static std::vector< UrlgetKnownBrokers (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.

Definition at line 51 of file FailoverListener.h.


Constructor & Destructor Documentation

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

Subscribe to amq.failover exchange.

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

Member Function Documentation

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

Returns the latest list of known broker URLs.

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

Extract the broker list from a failover exchange message.


Member Data Documentation

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 C++ API Reference
Generated on Fri Nov 19 09:43:06 2010 for Qpid C++ Client API by doxygen 1.6.1