From d89955fa13d7356209713d28b14243392acde8c5 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 13 Dec 2006 09:22:07 +0000 Subject: Added prepared() method to MessageStore interface. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@486555 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/lib/client/Connection.h | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'qpid/cpp/lib/client') diff --git a/qpid/cpp/lib/client/Connection.h b/qpid/cpp/lib/client/Connection.h index 2da4eb50e3..aec4de0b37 100644 --- a/qpid/cpp/lib/client/Connection.h +++ b/qpid/cpp/lib/client/Connection.h @@ -42,7 +42,12 @@ namespace client { class Channel; -class Connection : public virtual qpid::framing::InputHandler, + /** + * Represents a connection to an AMQP broker. All communication is + * initiated by establishing a connection, then opening one or + * more channels over that connection. + */ + class Connection : public virtual qpid::framing::InputHandler, public virtual qpid::sys::TimeoutHandler, public virtual qpid::sys::ShutdownHandler, private virtual qpid::framing::BodyHandler{ @@ -59,7 +64,7 @@ class Connection : public virtual qpid::framing::InputHandler, qpid::framing::OutputHandler* out; ResponseHandler responses; volatile bool closed; - qpid::framing::ProtocolVersion version; + qpid::framing::ProtocolVersion version; void channelException(Channel* channel, qpid::framing::AMQMethodBody* body, QpidError& e); void error(int code, const std::string& msg, int classid = 0, int methodid = 0); @@ -72,9 +77,23 @@ class Connection : public virtual qpid::framing::InputHandler, virtual void handleHeartbeat(qpid::framing::AMQHeartbeatBody::shared_ptr body); public: - + /** + * Creates a connection object, but does not open the + * connection. + * + * @param debug turns on tracing for the connection + * (i.e. prints details of the frames sent and received to std + * out). Optional and defaults to false. + * + * @param max_frame_size the maximum frame size that the + * client will accept. Optional and defaults to 65536. + */ Connection(bool debug = false, u_int32_t max_frame_size = 65536); ~Connection(); + + /** + * + */ void open(const std::string& host, int port = 5672, const std::string& uid = "guest", const std::string& pwd = "guest", const std::string& virtualhost = "/"); @@ -101,7 +120,6 @@ class Connection : public virtual qpid::framing::InputHandler, inline u_int32_t getMaxFrameSize(){ return max_frame_size; } }; - } } -- cgit v1.2.1