summaryrefslogtreecommitdiff
path: root/cpp/lib/client/Connection.h
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-13 09:22:07 +0000
committerGordon Sim <gsim@apache.org>2006-12-13 09:22:07 +0000
commit39dd61bc66b531810160ef00de938846c27052c9 (patch)
tree17e773b91f7e5c98302a1e5d67fcc6398c67b2f0 /cpp/lib/client/Connection.h
parenta775c87d5e2c5a6e1f8205541378ab3e1a0a8089 (diff)
downloadqpid-python-39dd61bc66b531810160ef00de938846c27052c9.tar.gz
Added prepared() method to MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@486555 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/client/Connection.h')
-rw-r--r--cpp/lib/client/Connection.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/cpp/lib/client/Connection.h b/cpp/lib/client/Connection.h
index 2da4eb50e3..aec4de0b37 100644
--- a/cpp/lib/client/Connection.h
+++ b/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; }
};
-
}
}