qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1534108 - in /qpid/trunk/qpid/cpp/src/qpid/messaging/amqp: ConnectionContext.cpp ConnectionContext.h ReceiverContext.cpp ReceiverContext.h ReceiverHandle.cpp
Date Mon, 21 Oct 2013 11:57:33 GMT
Author: gsim
Date: Mon Oct 21 11:57:33 2013
New Revision: 1534108

URL: http://svn.apache.org/r1534108
Log:
QPID-5247: implement Receiver::isClosed()

Modified:
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverHandle.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp?rev=1534108&r1=1534107&r2=1534108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp Mon Oct 21 11:57:33
2013
@@ -476,6 +476,15 @@ void ConnectionContext::checkClosed(boos
     }
 }
 
+bool ConnectionContext::isClosed(boost::shared_ptr<SessionContext> ssn, boost::shared_ptr<ReceiverContext>
lnk)
+{
+    try {
+        checkClosed(ssn, lnk->receiver);
+        return false;
+    } catch (const LinkError&) {
+        return true;
+    }
+}
 void ConnectionContext::checkClosed(boost::shared_ptr<SessionContext> ssn, boost::shared_ptr<ReceiverContext>
lnk)
 {
     checkClosed(ssn, lnk->receiver);

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h?rev=1534108&r1=1534107&r2=1534108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.h Mon Oct 21 11:57:33 2013
@@ -77,6 +77,7 @@ class ConnectionContext : public qpid::s
     void attach(boost::shared_ptr<SessionContext>, boost::shared_ptr<ReceiverContext>);
     void detach(boost::shared_ptr<SessionContext>, boost::shared_ptr<SenderContext>);
     void detach(boost::shared_ptr<SessionContext>, boost::shared_ptr<ReceiverContext>);
+    bool isClosed(boost::shared_ptr<SessionContext>, boost::shared_ptr<ReceiverContext>);
     void send(boost::shared_ptr<SessionContext>, boost::shared_ptr<SenderContext>
ctxt, const qpid::messaging::Message& message, bool sync);
     bool fetch(boost::shared_ptr<SessionContext> ssn, boost::shared_ptr<ReceiverContext>
lnk, qpid::messaging::Message& message, qpid::messaging::Duration timeout);
     bool get(boost::shared_ptr<SessionContext> ssn, boost::shared_ptr<ReceiverContext>
lnk, qpid::messaging::Message& message, qpid::messaging::Duration timeout);

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp?rev=1534108&r1=1534107&r2=1534108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.cpp Mon Oct 21 11:57:33 2013
@@ -123,11 +123,6 @@ Address ReceiverContext::getAddress() co
     return address;
 }
 
-bool ReceiverContext::isClosed() const
-{
-    return false;//TODO
-}
-
 void ReceiverContext::reset(pn_session_t* session)
 {
     receiver = pn_receiver(session, name.c_str());

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h?rev=1534108&r1=1534107&r2=1534108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverContext.h Mon Oct 21 11:57:33 2013
@@ -55,7 +55,6 @@ class ReceiverContext
     void close();
     const std::string& getName() const;
     const std::string& getSource() const;
-    bool isClosed() const;
     void configure();
     void verify();
     Address getAddress() const;

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverHandle.cpp?rev=1534108&r1=1534107&r2=1534108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverHandle.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ReceiverHandle.cpp Mon Oct 21 11:57:33 2013
@@ -100,7 +100,7 @@ qpid::messaging::Session ReceiverHandle:
 
 bool ReceiverHandle::isClosed() const
 {
-    return receiver->isClosed();
+    return connection->isClosed(session, receiver);
 }
 
 Address ReceiverHandle::getAddress() const



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


Mime
View raw message