diff options
| author | Gordon Sim <gsim@apache.org> | 2008-04-29 20:15:18 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-04-29 20:15:18 +0000 |
| commit | acc0dee435e1fa22e3b1e7cdfecf6913bf88988e (patch) | |
| tree | 729f7a03543acf23380e68897f8788a3e6b45e2e /cpp/src/qpid/client/ConnectionImpl.h | |
| parent | a19ce3b1863f80c1232ec2690cd920325a39d71a (diff) | |
| download | qpid-python-acc0dee435e1fa22e3b1e7cdfecf6913bf88988e.tar.gz | |
QPID-974: allow the size of the queue of outgoing frames to be restricted
QPID-544: tidy up configuration (ensuring desired settings are used correctly,
allowing tcp socket options to be set etc)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@652083 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.h')
| -rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.h b/cpp/src/qpid/client/ConnectionImpl.h index d0df9238f2..986b044b49 100644 --- a/cpp/src/qpid/client/ConnectionImpl.h +++ b/cpp/src/qpid/client/ConnectionImpl.h @@ -22,22 +22,26 @@ #ifndef _ConnectionImpl_ #define _ConnectionImpl_ -#include <map> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include "Bounds.h" +#include "ConnectionHandler.h" +#include "Connector.h" #include "qpid/framing/FrameHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/ShutdownHandler.h" #include "qpid/sys/TimeoutHandler.h" -#include "ConnectionHandler.h" -#include "Connector.h" + +#include <map> +#include <boost/shared_ptr.hpp> +#include <boost/weak_ptr.hpp> namespace qpid { namespace client { +class ConnectionSettings; class SessionImpl; -class ConnectionImpl : public framing::FrameHandler, +class ConnectionImpl : public Bounds, + public framing::FrameHandler, public sys::TimeoutHandler, public sys::ShutdownHandler @@ -47,7 +51,7 @@ class ConnectionImpl : public framing::FrameHandler, SessionMap sessions; ConnectionHandler handler; - boost::shared_ptr<Connector> connector; + Connector connector; framing::ProtocolVersion version; sys::Mutex lock; bool isClosed; @@ -55,6 +59,8 @@ class ConnectionImpl : public framing::FrameHandler, template <class F> void detachAll(const F&); + void open(const std::string& host, int port); + SessionVector closeInternal(const sys::Mutex::ScopedLock&); void incoming(framing::AMQFrame& frame); void closed(uint16_t, const std::string&); @@ -64,21 +70,16 @@ class ConnectionImpl : public framing::FrameHandler, bool setClosing(); public: - typedef boost::shared_ptr<ConnectionImpl> shared_ptr; - - ConnectionImpl(boost::shared_ptr<Connector> c); + ConnectionImpl(framing::ProtocolVersion version, const ConnectionSettings& settings); ~ConnectionImpl(); void addSession(const boost::shared_ptr<SessionImpl>&); - void open(const std::string& host, int port = 5672, - const std::string& uid = "guest", - const std::string& pwd = "guest", - const std::string& virtualhost = "/"); void close(); void handle(framing::AMQFrame& frame); void erase(uint16_t channel); - boost::shared_ptr<Connector> getConnector() { return connector; } + + const ConnectionSettings& getNegotiatedSettings(); }; }} |
