Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
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< 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.


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:
useInitialIf 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

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 Thu Aug 23 2012 for Qpid C++ Client API by doxygen 1.7.5