qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1558911 - in /qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src: Connection.cpp Connection.h
Date Thu, 16 Jan 2014 20:37:10 GMT
Author: chug
Date: Thu Jan 16 20:37:10 2014
New Revision: 1558911

URL: http://svn.apache.org/r1558911
Log:
QPID-5481: Messaging API Update - 1520673 Connection reconnect() and getUrl() added

Modified:
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp
    qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp?rev=1558911&r1=1558910&r2=1558911&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp Thu Jan 16 20:37:10 2014
@@ -267,6 +267,56 @@ namespace Messaging {
         }
     }
 
+
+    void Connection::Reconnect(System::String ^ url)
+    {
+        System::Exception ^ newException = nullptr;
+
+        try
+        {
+            msclr::lock lk(privateLock);
+            ThrowIfDisposed();
+
+            std::string nativeUrl = QpidMarshal::ToNative(url);
+            nativeObjPtr->reconnect(nativeUrl);
+        }
+        catch (const ::qpid::types::Exception & error)
+        {
+            String ^ errmsg = gcnew String(error.what());
+            newException    = gcnew QpidException(errmsg);
+        }
+
+        if (newException != nullptr)
+        {
+            throw newException;
+        }
+    }
+
+
+    void Connection::Reconnect()
+    {
+        System::Exception ^ newException = nullptr;
+
+        try
+        {
+            msclr::lock lk(privateLock);
+            ThrowIfDisposed();
+
+            nativeObjPtr->reconnect();
+        }
+        catch (const ::qpid::types::Exception & error)
+        {
+            String ^ errmsg = gcnew String(error.what());
+            newException    = gcnew QpidException(errmsg);
+        }
+
+        if (newException != nullptr)
+        {
+            throw newException;
+        }
+    }
+
+
     //
     // CreateTransactionalSession()
     //

Modified: qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h?rev=1558911&r1=1558910&r2=1558911&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/dotnet/src/Connection.h Thu Jan 16 20:37:10 2014
@@ -129,6 +129,20 @@ namespace Messaging {
             }
         }
 
+        void Reconnect(System::String ^ url);
+        void Reconnect();
+        
+        property System::String ^ Url
+        {
+            System::String ^ get()
+            {
+                msclr::lock lk(privateLock);
+                ThrowIfDisposed();
+
+                return gcnew System::String(nativeObjPtr->getUrl().c_str());
+            }
+        }
+
         // CreateTransactionalSession()
         Session ^ CreateTransactionalSession();
         Session ^ CreateTransactionalSession(System::String ^ name);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message