You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/01/12 19:39:28 UTC

svn commit: r495681 - in /incubator/qpid/branches/qpid.0-9/cpp/lib/broker: SessionHandlerImpl.cpp SessionHandlerImpl.h

Author: aconway
Date: Fri Jan 12 10:39:26 2007
New Revision: 495681

URL: http://svn.apache.org/viewvc?view=rev&rev=495681
Log:

Andrew Stitcher <as...@redhat.com>
* Add empty implementation of handler class for protocol Message class.

Modified:
    incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.cpp
    incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.h

Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.cpp?view=diff&rev=495681&r1=495680&r2=495681
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.cpp (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.cpp Fri Jan 12 10:39:26 2007
@@ -47,9 +47,9 @@
     exchangeHandler(new ExchangeHandlerImpl(this)),
     queueHandler(new QueueHandlerImpl(this)),
     txHandler(new TxHandlerImpl(this)),
+    messageHandler(new MessageHandlerImpl(this)),
     framemax(65536), 
-    heartbeat(0) 
-    {
+    heartbeat(0){
     
     client =NULL;    
 }
@@ -511,4 +511,144 @@
         assert(0);                // FIXME aconway 2007-01-04: 0-9 feature
 }
 
+// Message class method handlers
+void
+SessionHandlerImpl::MessageHandlerImpl::append( u_int16_t /*channel*/,
+                    const string& /*reference*/,
+                    const string& /*bytes*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+
+void
+SessionHandlerImpl::MessageHandlerImpl::cancel( u_int16_t /*channel*/,
+                    const string& /*destination*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::checkpoint( u_int16_t /*channel*/,
+                    const string& /*reference*/,
+                    const string& /*identifier*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::close( u_int16_t /*channel*/,
+                    const string& /*reference*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::consume( u_int16_t /*channel*/,
+                    u_int16_t /*ticket*/,
+                    const string& /*queue*/,
+                    const string& /*destination*/,
+                    bool /*noLocal*/,
+                    bool /*noAck*/,
+                    bool /*exclusive*/,
+                    const qpid::framing::FieldTable& /*filter*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::empty( u_int16_t /*channel*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::get( u_int16_t /*channel*/,
+                    u_int16_t /*ticket*/,
+                    const string& /*queue*/,
+                    const string& /*destination*/,
+                    bool /*noAck*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::offset( u_int16_t /*channel*/,
+                    u_int64_t /*value*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::ok( u_int16_t /*channel*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::open( u_int16_t /*channel*/,
+                    const string& /*reference*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::qos( u_int16_t /*channel*/,
+                    u_int32_t /*prefetchSize*/,
+                    u_int16_t /*prefetchCount*/,
+                    bool /*global*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
 
+void
+SessionHandlerImpl::MessageHandlerImpl::recover( u_int16_t /*channel*/,
+                    bool /*requeue*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::reject( u_int16_t /*channel*/,
+                    u_int16_t /*code*/,
+                    const string& /*text*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::resume( u_int16_t /*channel*/,
+                    const string& /*reference*/,
+                    const string& /*identifier*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+
+void
+SessionHandlerImpl::MessageHandlerImpl::transfer( u_int16_t /*channel*/,
+                    u_int16_t /*ticket*/,
+                    const string& /*destination*/,
+                    bool /*redelivered*/,
+                    bool /*immediate*/,
+                    u_int64_t /*ttl*/,
+                    u_int8_t /*priority*/,
+                    u_int64_t /*timestamp*/,
+                    u_int8_t /*deliveryMode*/,
+                    u_int64_t /*expiration*/,
+                    const string& /*exchange*/,
+                    const string& /*routingKey*/,
+                    const string& /*messageId*/,
+                    const string& /*correlationId*/,
+                    const string& /*replyTo*/,
+                    const string& /*contentType*/,
+                    const string& /*contentEncoding*/,
+                    const string& /*userId*/,
+                    const string& /*appId*/,
+                    const string& /*transactionId*/,
+                    const string& /*securityToken*/,
+                    const qpid::framing::FieldTable& /*applicationHeaders*/,
+                    qpid::framing::Content /*body*/ )
+{
+        assert(0);                // FIXME astitcher 2007-01-11: 0-9 feature
+}
+ 

Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.h?view=diff&rev=495681&r1=495680&r2=495681
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.h (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/SessionHandlerImpl.h Fri Jan 12 10:39:26 2007
@@ -68,9 +68,9 @@
     Settings(u_int32_t _timeout, u_int64_t _stagingThreshold) : timeout(_timeout), stagingThreshold(_stagingThreshold) {}
 };
 
-class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, 
-                           public virtual qpid::framing::AMQP_ServerOperations, 
-                           public virtual ConnectionToken
+class SessionHandlerImpl : public qpid::sys::SessionHandler, 
+                           public qpid::framing::AMQP_ServerOperations, 
+                           public ConnectionToken
 {
     typedef std::map<u_int16_t, Channel*>::iterator channel_iterator;
     typedef std::vector<Queue::shared_ptr>::iterator queue_iterator;
@@ -88,6 +88,7 @@
     std::auto_ptr<ExchangeHandler> exchangeHandler;
     std::auto_ptr<QueueHandler> queueHandler;
     std::auto_ptr<TxHandler> txHandler;
+    std::auto_ptr<MessageHandler> messageHandler;
 
     std::map<u_int16_t, Channel*> channels;
     std::vector<Queue::shared_ptr> exclusiveQueues;
@@ -120,7 +121,7 @@
     virtual void closed();
     virtual ~SessionHandlerImpl();
 
-    class ConnectionHandlerImpl : public virtual ConnectionHandler{
+    class ConnectionHandlerImpl : public ConnectionHandler{
         SessionHandlerImpl* parent;
       public:
         inline ConnectionHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -145,7 +146,7 @@
         virtual ~ConnectionHandlerImpl(){}
     };
     
-    class ChannelHandlerImpl : public virtual ChannelHandler{
+    class ChannelHandlerImpl : public ChannelHandler{
         SessionHandlerImpl* parent;
       public:
         inline ChannelHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -174,7 +175,7 @@
         virtual ~ChannelHandlerImpl(){}
     };
     
-    class ExchangeHandlerImpl : public virtual ExchangeHandler{
+    class ExchangeHandlerImpl : public ExchangeHandler{
         SessionHandlerImpl* parent;
       public:
         inline ExchangeHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -196,7 +197,7 @@
     };
 
     
-    class QueueHandlerImpl : public virtual QueueHandler{
+    class QueueHandlerImpl : public QueueHandler{
         SessionHandlerImpl* parent;
       public:
         inline QueueHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -226,7 +227,7 @@
         virtual ~QueueHandlerImpl(){}
     };
 
-    class BasicHandlerImpl : public virtual BasicHandler{
+    class BasicHandlerImpl : public BasicHandler{
         SessionHandlerImpl* parent;
       public:
         inline BasicHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -255,7 +256,7 @@
         virtual ~BasicHandlerImpl(){}
     };
 
-    class TxHandlerImpl : public virtual TxHandler{
+    class TxHandlerImpl : public TxHandler{
         SessionHandlerImpl* parent;
       public:
         TxHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
@@ -265,26 +266,110 @@
         virtual void rollback(u_int16_t channel);
     };
 
+    class MessageHandlerImpl : public MessageHandler {
+        SessionHandlerImpl* parent;
+
+        // Constructors and destructors
+
+      public:
+        MessageHandlerImpl() {}
+        MessageHandlerImpl(SessionHandlerImpl* _parent) : parent(_parent) {}
+        virtual ~MessageHandlerImpl() {}
+
+        // Protocol methods
+        virtual void append( u_int16_t channel,
+                            const string& reference,
+                            const string& bytes );
+
+        virtual void cancel( u_int16_t channel,
+                            const string& destination );
+
+        virtual void checkpoint( u_int16_t channel,
+                            const string& reference,
+                            const string& identifier );
+
+        virtual void close( u_int16_t channel,
+                            const string& reference );
+
+        virtual void consume( u_int16_t channel,
+                            u_int16_t ticket,
+                            const string& queue,
+                            const string& destination,
+                            bool noLocal,
+                            bool noAck,
+                            bool exclusive,
+                            const qpid::framing::FieldTable& filter );
+
+        virtual void empty( u_int16_t channel );
+
+        virtual void get( u_int16_t channel,
+                            u_int16_t ticket,
+                            const string& queue,
+                            const string& destination,
+                            bool noAck );
+
+        virtual void offset( u_int16_t channel,
+                            u_int64_t value );
+
+        virtual void ok( u_int16_t channel );
+
+        virtual void open( u_int16_t channel,
+                            const string& reference );
+
+        virtual void qos( u_int16_t channel,
+                            u_int32_t prefetchSize,
+                            u_int16_t prefetchCount,
+                            bool global );
+
+        virtual void recover( u_int16_t channel,
+                            bool requeue );
+
+        virtual void reject( u_int16_t channel,
+                            u_int16_t code,
+                            const string& text );
+
+        virtual void resume( u_int16_t channel,
+                            const string& reference,
+                            const string& identifier );
+
+        virtual void transfer( u_int16_t channel,
+                            u_int16_t ticket,
+                            const string& destination,
+                            bool redelivered,
+                            bool immediate,
+                            u_int64_t ttl,
+                            u_int8_t priority,
+                            u_int64_t timestamp,
+                            u_int8_t deliveryMode,
+                            u_int64_t expiration,
+                            const string& exchange,
+                            const string& routingKey,
+                            const string& messageId,
+                            const string& correlationId,
+                            const string& replyTo,
+                            const string& contentType,
+                            const string& contentEncoding,
+                            const string& userId,
+                            const string& appId,
+                            const string& transactionId,
+                            const string& securityToken,
+                            const qpid::framing::FieldTable& applicationHeaders,
+                            qpid::framing::Content body );
+    };
 
-    inline virtual ChannelHandler* getChannelHandler(){ return channelHandler.get(); }
-    inline virtual ConnectionHandler* getConnectionHandler(){ return connectionHandler.get(); }
-    inline virtual BasicHandler* getBasicHandler(){ return basicHandler.get(); }
-    inline virtual ExchangeHandler* getExchangeHandler(){ return exchangeHandler.get(); }
-    inline virtual QueueHandler* getQueueHandler(){ return queueHandler.get(); }
-    inline virtual TxHandler* getTxHandler(){ return txHandler.get(); }       
+    virtual ChannelHandler* getChannelHandler(){ return channelHandler.get(); }
+    virtual ConnectionHandler* getConnectionHandler(){ return connectionHandler.get(); }
+    virtual BasicHandler* getBasicHandler(){ return basicHandler.get(); }
+    virtual ExchangeHandler* getExchangeHandler(){ return exchangeHandler.get(); }
+    virtual QueueHandler* getQueueHandler(){ return queueHandler.get(); }
+    virtual TxHandler* getTxHandler(){ return txHandler.get(); }       
+    virtual MessageHandler* getMessageHandler(){ return messageHandler.get(); } 
  
-    inline virtual AccessHandler* getAccessHandler(){ throw ConnectionException(540, "Access class not implemented"); }       
-    inline virtual FileHandler* getFileHandler(){ throw ConnectionException(540, "File class not implemented"); }       
-    inline virtual StreamHandler* getStreamHandler(){ throw ConnectionException(540, "Stream class not implemented"); }       
-    inline virtual DtxHandler* getDtxHandler(){ throw ConnectionException(540, "Dtx class not implemented"); }       
-    inline virtual TunnelHandler* getTunnelHandler(){ throw ConnectionException(540, "Tunnel class not implemented"); } 
-
-    virtual AMQP_ServerOperations::MessageHandler* getMessageHandler(){ throw ConnectionException(540, "Message class not implemented"); } 
-
-    // FIXME aconway 2007-01-04: Remove?
-    // Temporary add-in to resolve version conflicts: AMQP v8.0 still defines class Test;
-    // however v0.9 will not - kpvdr 2006-11-17      
-    // inline virtual TestHandler* getTestHandler(){ throw ConnectionException(540, "Test class not implemented"); }       
+    virtual AccessHandler* getAccessHandler(){ throw ConnectionException(540, "Access class not implemented"); }       
+    virtual FileHandler* getFileHandler(){ throw ConnectionException(540, "File class not implemented"); }       
+    virtual StreamHandler* getStreamHandler(){ throw ConnectionException(540, "Stream class not implemented"); }       
+    virtual DtxHandler* getDtxHandler(){ throw ConnectionException(540, "Dtx class not implemented"); }       
+    virtual TunnelHandler* getTunnelHandler(){ throw ConnectionException(540, "Tunnel class not implemented"); } 
 };
 
 }