summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-09-06 19:37:52 +0000
committerGordon Sim <gsim@apache.org>2013-09-06 19:37:52 +0000
commit9f89516b7a87b0a60abc665c4d83ae7daecbc8ad (patch)
treef8fdb59196e37d70fe902244afa28e5a442abd6d /qpid/cpp/include
parente1739e9a6f90a8029a099806e3778205f4f6e8d2 (diff)
downloadqpid-python-9f89516b7a87b0a60abc665c4d83ae7daecbc8ad.tar.gz
QPID-4932: expose reconnect&replay logic for application to control itself
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1520673 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
-rw-r--r--qpid/cpp/include/qpid/messaging/Connection.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/qpid/cpp/include/qpid/messaging/Connection.h b/qpid/cpp/include/qpid/messaging/Connection.h
index 58e61c4655..bb83685731 100644
--- a/qpid/cpp/include/qpid/messaging/Connection.h
+++ b/qpid/cpp/include/qpid/messaging/Connection.h
@@ -98,6 +98,33 @@ class QPID_MESSAGING_CLASS_EXTERN Connection : public qpid::messaging::Handle<Co
QPID_MESSAGING_EXTERN void open();
QPID_MESSAGING_EXTERN bool isOpen();
QPID_MESSAGING_EXTERN bool isOpen() const;
+
+ /**
+ * Attempts to reconnect to the specified url, re-establish
+ * existing sessions, senders and receivers and resend any indoubt
+ * messages.
+ *
+ * This can be used to directly control reconnect behaviour rather
+ * than using the reconnect option for automatically handling
+ * that.
+ */
+ QPID_MESSAGING_EXTERN void reconnect(const std::string& url);
+ /**
+ * Attempts to reconnect to the original url, including any
+ * specified reconnect_urls, re-establish existing sessions,
+ * senders and receivers and resend any indoubt messages.
+ *
+ * This can be used to directly control reconnect behaviour rather
+ * than using the reconnect option for automatically handling
+ * that.
+ */
+ QPID_MESSAGING_EXTERN void reconnect();
+ /**
+ * returns a url reprsenting the broker the client is currently
+ * connected to (or an e,pty string if it is not connected).
+ */
+ QPID_MESSAGING_EXTERN std::string getUrl() const;
+
/**
* Closes a connection and all sessions associated with it. An
* opened connection must be closed before the last handle is