summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Connection.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-09-28 16:21:34 +0000
committerAlan Conway <aconway@apache.org>2007-09-28 16:21:34 +0000
commit8b82aef0397d65de0c7278476e4f409fcc636306 (patch)
treea25d9bbb01203335bc1450a5e5ed0c29074913ae /cpp/src/qpid/client/Connection.h
parentf689c47486b4cfc7655e37da2b232fe27be1cc42 (diff)
downloadqpid-python-8b82aef0397d65de0c7278476e4f409fcc636306.tar.gz
* src/tests/ClientSessionTest.cpp: Suspend/resume tests.
* broker/SessionManager.cpp, broker/SessionHandler.cpp: Implement suspend/resume * client/ScopedAssociation.h, SessionCore.h, SessionHandler.h: Simplified relationships. - Removed ScopedAssociation. - SessionHandler: is now a member of SessionCore. - SessionCore: shared_ptr ownership by Session(s) and ConnectionImpl. - Using framing::FrameHandler interfaces. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580403 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Connection.h')
-rw-r--r--cpp/src/qpid/client/Connection.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/Connection.h b/cpp/src/qpid/client/Connection.h
index f5d6a387a9..4a9a68e8b3 100644
--- a/cpp/src/qpid/client/Connection.h
+++ b/cpp/src/qpid/client/Connection.h
@@ -28,7 +28,7 @@
#include "ConnectionImpl.h"
#include "qpid/client/Session.h"
#include "qpid/framing/AMQP_HighestVersion.h"
-
+#include "qpid/framing/Uuid.h"
namespace qpid {
@@ -122,7 +122,25 @@ class Connection
*/
void openChannel(Channel&);
- Session newSession();
+ /**
+ * Create a new session on this connection. Sessions allow
+ * multiple streams of work to be multiplexed over the same
+ * connection.
+ *
+ *@param detachedLifetime: A session may be detached from its
+ * channel, either by calling Session::suspend() or because of a
+ * network failure. The session state is perserved for
+ * detachedLifetime seconds to allow a call to resume(). After
+ * that the broker may discard the session state. Default is 0,
+ * meaning the session cannot be resumed.
+ */
+ Session newSession(uint32_t detachedLifetime=0);
+
+ /**
+ * Resume a suspendded session. A session may be resumed
+ * on a different connection to the one that created it.
+ */
+ void resume(Session& session);
};
}} // namespace qpid::client