diff options
| author | Gordon Sim <gsim@apache.org> | 2013-09-06 19:37:52 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-09-06 19:37:52 +0000 |
| commit | fc848c55c4c9fd3e2131a7b16985f24c48053c42 (patch) | |
| tree | 840f946797e83fd5d4b566b6a4d0a256362d9876 /cpp/include | |
| parent | c5ba85f290cede8793ab296874c5432650b1b879 (diff) | |
| download | qpid-python-fc848c55c4c9fd3e2131a7b16985f24c48053c42.tar.gz | |
QPID-4932: expose reconnect&replay logic for application to control itself
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1520673 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
| -rw-r--r-- | cpp/include/qpid/messaging/Connection.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cpp/include/qpid/messaging/Connection.h b/cpp/include/qpid/messaging/Connection.h index 58e61c4655..bb83685731 100644 --- a/cpp/include/qpid/messaging/Connection.h +++ b/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 |
