You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2012/01/13 19:22:50 UTC

svn commit: r1231222 - in /qpid/trunk/qpid/cpp/src/qpid: broker/SessionState.cpp client/SessionImpl.cpp client/SessionImpl.h

Author: kgiusti
Date: Fri Jan 13 18:22:50 2012
New Revision: 1231222

URL: http://svn.apache.org/viewvc?rev=1231222&view=rev
Log:
QPID-3630: remove additional code in client.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=1231222&r1=1231221&r2=1231222&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Fri Jan 13 18:22:50 2012
@@ -25,7 +25,6 @@
 #include "qpid/broker/SessionManager.h"
 #include "qpid/broker/SessionHandler.h"
 #include "qpid/sys/ClusterSafe.h"
-#include "qpid/sys/Timer.h"
 #include "qpid/framing/AMQContentBody.h"
 #include "qpid/framing/AMQHeaderBody.h"
 #include "qpid/framing/AMQMethodBody.h"
@@ -33,7 +32,6 @@
 #include "qpid/framing/ServerInvoker.h"
 #include "qpid/log/Statement.h"
 #include "qpid/management/ManagementAgent.h"
-#include "qpid/framing/AMQP_ClientProxy.h"
 
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>

Modified: qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.cpp?rev=1231222&r1=1231221&r2=1231222&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.cpp Fri Jan 13 18:22:50 2012
@@ -62,7 +62,6 @@ SessionImpl::SessionImpl(const std::stri
       proxy(ioHandler),
       nextIn(0),
       nextOut(0),
-      sendMsgCredit(0),
       doClearDeliveryPropertiesExchange(true),
       autoDetach(true)
 {
@@ -83,7 +82,6 @@ SessionImpl::~SessionImpl() {
             handleClosed();
             state.waitWaiters();
         }
-        delete sendMsgCredit;
     }
     connection->erase(channel);
 }
@@ -373,10 +371,6 @@ void SessionImpl::sendRawFrame(AMQFrame&
 
 Future SessionImpl::sendCommand(const AMQBody& command, const MethodContent* content)
 {
-    // Only message transfers have content
-    if (content && sendMsgCredit) {
-        sendMsgCredit->acquire();
-    }
     Acquire a(sendLock);
     SequenceNumber id = nextOut++;
     {
@@ -480,9 +474,7 @@ void SessionImpl::handleIn(AMQFrame& fra
             //make sure the command id sequence and completion
             //tracking takes account of execution commands
             Lock l(state);
-            completedIn.add(nextIn++);            
-        } else if (invoke(static_cast<MessageHandler&>(*this), *frame.getBody())) {
-            ;
+            completedIn.add(nextIn++);
         } else {
             //if not handled by this class, its for the application:
             deliver(frame);
@@ -692,70 +684,6 @@ void SessionImpl::exception(uint16_t err
         setTimeout(0);
 }
 
-// Message methods:
-void SessionImpl::accept(const qpid::framing::SequenceSet&)
-{
-}
-
-void SessionImpl::reject(const qpid::framing::SequenceSet&, uint16_t, const std::string&)
-{
-}
-
-void SessionImpl::release(const qpid::framing::SequenceSet&, bool)
-{
-}
-
-MessageResumeResult SessionImpl::resume(const std::string&, const std::string&)
-{
-    throw NotImplementedException("resuming transfers not yet supported");
-}
-
-namespace {
-    const std::string QPID_SESSION_DEST = "";
-    const uint8_t FLOW_MODE_CREDIT = 0;
-    const uint8_t CREDIT_MODE_MSG = 0;
-}
-
-void SessionImpl::setFlowMode(const std::string& dest, uint8_t flowMode)
-{
-    if ( dest != QPID_SESSION_DEST ) {
-        QPID_LOG(warning, "Ignoring flow control for unknown destination: " << dest);
-        return;
-    }
-    
-    if ( flowMode != FLOW_MODE_CREDIT ) {
-        throw NotImplementedException("window flow control mode not supported by producer");
-    }
-    Lock l(state);
-    sendMsgCredit = new sys::Semaphore(0);
-}
-
-void SessionImpl::flow(const std::string& dest, uint8_t mode, uint32_t credit)
-{
-    if ( dest != QPID_SESSION_DEST ) {
-        QPID_LOG(warning, "Ignoring flow control for unknown destination: " << dest);
-        return;
-    }
-
-    if ( mode != CREDIT_MODE_MSG ) {
-        return;
-    }
-    if (sendMsgCredit) {
-        sendMsgCredit->release(credit);
-    }
-}
-
-void SessionImpl::stop(const std::string& dest)
-{
-    if ( dest != QPID_SESSION_DEST ) {
-        QPID_LOG(warning, "Ignoring flow control for unknown destination: " << dest);
-        return;
-    }
-    if (sendMsgCredit) {
-        sendMsgCredit->forceLock();
-    }
-}
-
 //private utility methods:
 
 inline void SessionImpl::setState(State s) //call with lock held

Modified: qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.h?rev=1231222&r1=1231221&r2=1231222&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/SessionImpl.h Fri Jan 13 18:22:50 2012
@@ -62,8 +62,7 @@ class SessionHandler;
 class SessionImpl : public framing::FrameHandler::InOutHandler,
                     public Execution,
                     private framing::AMQP_ClientOperations::SessionHandler,
-                    private framing::AMQP_ClientOperations::ExecutionHandler,
-                    private framing::AMQP_ClientOperations::MessageHandler
+                    private framing::AMQP_ClientOperations::ExecutionHandler
 {
 public:
     SessionImpl(const std::string& name, boost::shared_ptr<ConnectionImpl>);
@@ -141,7 +140,6 @@ private:
     };
     typedef framing::AMQP_ClientOperations::SessionHandler SessionHandler;
     typedef framing::AMQP_ClientOperations::ExecutionHandler ExecutionHandler;
-    typedef framing::AMQP_ClientOperations::MessageHandler MessageHandler;
     typedef sys::StateMonitor<State, DETACHED> StateMonitor;
     typedef StateMonitor::Set States;
 
@@ -200,18 +198,6 @@ private:
                    uint8_t fieldIndex,
                    const std::string& description,
                    const framing::FieldTable& errorInfo);
-                   
-    // Note: Following methods are called by network thread in
-    // response to message commands from the broker
-    // EXCEPT Message.Transfer
-    void accept(const qpid::framing::SequenceSet&);
-    void reject(const qpid::framing::SequenceSet&, uint16_t, const std::string&);
-    void release(const qpid::framing::SequenceSet&, bool);
-    qpid::framing::MessageResumeResult resume(const std::string&, const std::string&);
-    void setFlowMode(const std::string&, uint8_t);
-    void flow(const std::string&, uint8_t, uint32_t);
-    void stop(const std::string&);
-
 
     sys::ExceptionHolder exceptionHolder;
     mutable StateMonitor state;
@@ -239,9 +225,6 @@ private:
 
     SessionState sessionState;
 
-    // Only keep track of message credit 
-    sys::Semaphore* sendMsgCredit;
-
     bool doClearDeliveryPropertiesExchange;
 
     bool autoDetach;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org