diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-15 17:26:43 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-15 17:26:43 +0000 |
commit | 3f2ac50fdb042c2c48ebbdc1e70e442f0bf1ab86 (patch) | |
tree | 11a8838ed371c23f57391b4a212c57ddb44051ff /cpp/src/qpid/client/ClientChannel.h | |
parent | fb26cfb87668cd7b87cf7cdea2ca1f8c367de1a2 (diff) | |
download | qpid-python-3f2ac50fdb042c2c48ebbdc1e70e442f0bf1ab86.tar.gz |
Altered old client channel to use new generated session interface (primarily to reduce the number of places where method bodies are constructed).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566274 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ClientChannel.h')
-rw-r--r-- | cpp/src/qpid/client/ClientChannel.h | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/cpp/src/qpid/client/ClientChannel.h b/cpp/src/qpid/client/ClientChannel.h index bf5e2aa0d9..98e04db109 100644 --- a/cpp/src/qpid/client/ClientChannel.h +++ b/cpp/src/qpid/client/ClientChannel.h @@ -21,13 +21,14 @@ * under the License. * */ +#include <memory> #include <boost/scoped_ptr.hpp> #include "qpid/framing/amqp_framing.h" #include "ClientExchange.h" #include "ClientMessage.h" #include "ClientQueue.h" #include "ConnectionImpl.h" -#include "SessionCore.h" +#include "Session.h" #include "qpid/Exception.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Runnable.h" @@ -58,9 +59,6 @@ class ReturnedMessageHandler; class Channel : private sys::Runnable { private: - struct UnknownMethod {}; - typedef shared_ptr<framing::AMQMethodBody> MethodPtr; - struct Consumer{ MessageListener* listener; AckMode ackMode; @@ -81,40 +79,14 @@ class Channel : private sys::Runnable ConsumerMap consumers; ConnectionImpl::shared_ptr connection; - SessionCore::shared_ptr session; + std::auto_ptr<Session> session; + SessionCore::shared_ptr sessionCore; framing::ChannelId channelId; BlockingQueue<ReceivedContent::shared_ptr> gets; void stop(); void setQos(); - - framing::AMQMethodBody::shared_ptr sendAndReceive( - framing::AMQMethodBody::shared_ptr, - framing::ClassId = 0, framing::MethodId = 0); - - framing::AMQMethodBody::shared_ptr sendAndReceiveSync( - bool sync, - framing::AMQMethodBody::shared_ptr, - framing::ClassId, framing::MethodId); - - void sendSync(bool sync, framing::AMQMethodBody::shared_ptr body); - - - template <class BodyType> - boost::shared_ptr<BodyType> sendAndReceive(framing::AMQMethodBody::shared_ptr body) { - return boost::shared_polymorphic_downcast<BodyType>( - sendAndReceive(body, BodyType::CLASS_ID, BodyType::METHOD_ID)); - } - - template <class BodyType> - boost::shared_ptr<BodyType> sendAndReceiveSync( - bool sync, framing::AMQMethodBody::shared_ptr body) { - return boost::shared_polymorphic_downcast<BodyType>( - sendAndReceiveSync( - sync, body, BodyType::CLASS_ID, BodyType::METHOD_ID)); - } - void open(ConnectionImpl::shared_ptr, SessionCore::shared_ptr); void closeInternal(); void join(); |