From d6901e52ab3ee9c40eddc4ad3b4787127c36d874 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 9 Oct 2008 19:36:51 +0000 Subject: Client-side support for amq.faiover exchange. Connection::getKnownBrokers provides latest list. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703237 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionImpl.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionImpl.h') diff --git a/cpp/src/qpid/client/ConnectionImpl.h b/cpp/src/qpid/client/ConnectionImpl.h index aca26b963d..22450a7ddf 100644 --- a/cpp/src/qpid/client/ConnectionImpl.h +++ b/cpp/src/qpid/client/ConnectionImpl.h @@ -24,6 +24,7 @@ #include "Bounds.h" #include "ConnectionHandler.h" + #include "qpid/framing/FrameHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/ShutdownHandler.h" @@ -41,6 +42,7 @@ namespace client { class Connector; class ConnectionSettings; class SessionImpl; +class FailoverListener; class ConnectionImpl : public Bounds, public framing::FrameHandler, @@ -54,7 +56,9 @@ class ConnectionImpl : public Bounds, SessionMap sessions; ConnectionHandler handler; boost::scoped_ptr connector; + boost::scoped_ptr failover; framing::ProtocolVersion version; + uint16_t nextChannel; sys::Mutex lock; template void closeInternal(const F&); @@ -72,13 +76,18 @@ class ConnectionImpl : public Bounds, void open(); bool isOpen() const; - void addSession(const boost::shared_ptr&); + boost::shared_ptr newSession(const std::string& name, uint32_t timeout, uint16_t channel=0); + void addSession(const boost::shared_ptr&, uint16_t channel=0); void close(); void handle(framing::AMQFrame& frame); void erase(uint16_t channel); - + void stopFailoverListener(); + const ConnectionSettings& getNegotiatedSettings(); + + std::vector getKnownBrokers(); + }; }} -- cgit v1.2.1