You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/02/21 18:40:49 UTC

svn commit: r629883 [2/2] - in /incubator/qpid/trunk/qpid: cpp/rubygen/templates/ cpp/src/ cpp/src/qpid/broker/ cpp/src/qpid/client/ cpp/src/qpid/framing/ cpp/src/tests/ python/qpid/ specs/

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp Thu Feb 21 09:40:42 2008
@@ -23,7 +23,7 @@
 
 #include "SubscriptionManager.h"
 #include <qpid/client/Dispatcher.h>
-#include <qpid/client/Session_0_10.h>
+#include <qpid/client/Session.h>
 #include <qpid/client/MessageListener.h>
 #include <set>
 #include <sstream>
@@ -32,7 +32,7 @@
 namespace qpid {
 namespace client {
 
-SubscriptionManager::SubscriptionManager(Session_0_10& s)
+SubscriptionManager::SubscriptionManager(Session& s)
     : dispatcher(s), session(s),
       messages(UNLIMITED), bytes(UNLIMITED), window(true),
       confirmMode(true), acquireMode(false),

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h Thu Feb 21 09:40:42 2008
@@ -24,7 +24,7 @@
 #include "qpid/sys/Mutex.h"
 #include <qpid/client/Dispatcher.h>
 #include <qpid/client/Completion.h>
-#include <qpid/client/Session_0_10.h>
+#include <qpid/client/Session.h>
 #include <qpid/client/MessageListener.h>
 #include <qpid/client/LocalQueue.h>
 #include <qpid/sys/Runnable.h>
@@ -48,7 +48,7 @@
     Completion subscribeInternal(const std::string& q, const std::string& dest);
     
     qpid::client::Dispatcher dispatcher;
-    qpid::client::Session_0_10& session;
+    qpid::client::Session& session;
     uint32_t messages;
     uint32_t bytes;
     bool window;
@@ -58,7 +58,7 @@
     bool autoStop;
     
   public:
-    SubscriptionManager(Session_0_10& session);
+    SubscriptionManager(Session& session);
     
     /**
      * Subscribe a MessagesListener to receive messages from queue.

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQP_HighestVersion.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQP_HighestVersion.h?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQP_HighestVersion.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQP_HighestVersion.h Thu Feb 21 09:40:42 2008
@@ -32,7 +32,7 @@
 namespace qpid {
 namespace framing {
 
-static ProtocolVersion highestProtocolVersion(0, 10);
+static ProtocolVersion highestProtocolVersion(99, 0);
 
 } /* namespace framing */
 } /* namespace qpid */

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h Thu Feb 21 09:40:42 2008
@@ -27,7 +27,7 @@
 #include "qpid/broker/Broker.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/ConnectionImpl.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 
 /**
@@ -86,7 +86,7 @@
 template <class ConnectionType>
 struct  SessionFixtureT : BrokerFixture {
     ConnectionType connection;
-    qpid::client::Session_0_10 session;
+    qpid::client::Session session;
     qpid::client::SubscriptionManager subs;
     qpid::client::LocalQueue lq;
 

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp Thu Feb 21 09:40:42 2008
@@ -24,7 +24,7 @@
 #include "qpid/sys/Monitor.h"
 #include "qpid/sys/Thread.h"
 #include "qpid/sys/Runnable.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/framing/TransferContent.h"
 #include "qpid/framing/reply_exceptions.h"
 
@@ -52,7 +52,7 @@
     uint expected;
     Dispatcher dispatcher;
 
-    DummyListener(Session_0_10& session, const string& n, uint ex) :
+    DummyListener(Session& session, const string& n, uint ex) :
         name(n), expected(ex), dispatcher(session) {}
 
     void run()

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/client_test.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/client_test.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/client_test.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/client_test.cpp Thu Feb 21 09:40:42 2008
@@ -31,7 +31,7 @@
 #include "TestOptions.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/Message.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/framing/FrameSet.h"
 #include "qpid/framing/MessageTransferBody.h"
 
@@ -92,7 +92,7 @@
 
         //Create and open a session on the connection through which
         //most functionality is exposed:
-        Session_0_10 session = connection.newSession(ASYNC);
+        Session session = connection.newSession(ASYNC);
 	if (opts.trace) std::cout << "Opened session." << std::endl;	
 
 

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/latencytest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/latencytest.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/latencytest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/latencytest.cpp Thu Feb 21 09:40:42 2008
@@ -30,7 +30,7 @@
 #include "TestOptions.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/Message.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 
 using namespace qpid;
@@ -98,7 +98,7 @@
 {
 protected:
     Connection connection;
-    Session_0_10 session;
+    Session session;
     Thread thread;
     string queue;
 

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp Thu Feb 21 09:40:42 2008
@@ -21,7 +21,7 @@
 
 #include "TestOptions.h"
 
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/Completion.h"
@@ -191,7 +191,7 @@
 
 struct Client : public Runnable {
     Connection connection;
-    Session_0_10 session;
+    Session session;
     Thread thread;
 
     Client() {

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp Thu Feb 21 09:40:42 2008
@@ -35,7 +35,7 @@
 #include "TestOptions.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/MessageListener.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 #include "qpid/sys/Time.h"
 #include "qpid/framing/FieldValue.h"
@@ -53,7 +53,7 @@
  * defined.
  */
 class Listener : public MessageListener{    
-    Session_0_10& session;
+    Session& session;
     SubscriptionManager& mgr;
     const string responseQueue;
     const bool transactional;
@@ -64,7 +64,7 @@
     void shutdown();
     void report();
 public:
-    Listener(Session_0_10& session, SubscriptionManager& mgr, const string& reponseQueue, bool tx);
+    Listener(Session& session, SubscriptionManager& mgr, const string& reponseQueue, bool tx);
     virtual void received(Message& msg);
 };
 
@@ -101,7 +101,7 @@
         else {
             Connection connection(args.trace);
             args.open(connection);
-            Session_0_10 session = connection.newSession(ASYNC);
+            Session session = connection.newSession(ASYNC);
             if (args.transactional) {
                 session.txSelect();
             }
@@ -144,7 +144,7 @@
     return 1;
 }
 
-Listener::Listener(Session_0_10& s, SubscriptionManager& m, const string& _responseq, bool tx) : 
+Listener::Listener(Session& s, SubscriptionManager& m, const string& _responseq, bool tx) : 
     session(s), mgr(m), responseQueue(_responseq), transactional(tx), init(false), count(0){}
 
 void Listener::received(Message& message){

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp Thu Feb 21 09:40:42 2008
@@ -37,7 +37,7 @@
 #include "TestOptions.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/MessageListener.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 #include "qpid/sys/Monitor.h"
 #include <unistd.h>
@@ -56,7 +56,7 @@
  * back by the subscribers.
  */
 class Publisher {    
-    Session_0_10& session;
+    Session& session;
     SubscriptionManager mgr;
     LocalQueue queue;
     const string controlTopic;
@@ -66,7 +66,7 @@
     string generateData(int size);
 
 public:
-    Publisher(Session_0_10& session, const string& controlTopic, bool tx, bool durable);
+    Publisher(Session& session, const string& controlTopic, bool tx, bool durable);
     int64_t publish(int msgs, int listeners, int size);
     void terminate();
 };
@@ -107,7 +107,7 @@
         else {
             Connection connection(args.trace);
             args.open(connection);
-            Session_0_10 session = connection.newSession(ASYNC);
+            Session session = connection.newSession(ASYNC);
             if (args.transactional) {
                 session.txSelect();
             }
@@ -150,7 +150,7 @@
     return 1;
 }
 
-Publisher::Publisher(Session_0_10& _session, const string& _controlTopic, bool tx, bool d) : 
+Publisher::Publisher(Session& _session, const string& _controlTopic, bool tx, bool d) : 
     session(_session), mgr(session), controlTopic(_controlTopic), transactional(tx), durable(d) 
 {
     mgr.subscribe(queue, "response");

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/txtest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/txtest.cpp?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/txtest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/txtest.cpp Thu Feb 21 09:40:42 2008
@@ -28,7 +28,7 @@
 #include "TestOptions.h"
 #include "qpid/client/Connection.h"
 #include "qpid/client/Message.h"
-#include "qpid/client/Session_0_10.h"
+#include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionManager.h"
 
 using namespace qpid;
@@ -96,7 +96,7 @@
 struct Client 
 {
     Connection connection;
-    Session_0_10 session;
+    Session session;
 
     Client() 
     {

Modified: incubator/qpid/trunk/qpid/python/qpid/connection.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/connection.py?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/connection.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/connection.py Thu Feb 21 09:40:42 2008
@@ -178,6 +178,12 @@
       raise "frame error: expected %r, got %r" % (self.FRAME_END, garbage)
     return frame
 
+  def write_99_0(self, frame):
+    self.write_0_10(frame)
+    
+  def read_99_0(self):
+    return self.read_0_10()
+
 class Frame:
 
   DECODERS = {}
@@ -233,7 +239,7 @@
 
   def encode(self, c):
     version = (c.spec.major, c.spec.minor)
-    if version == (0, 10):
+    if version == (0, 10) or version == (99, 0):
       c.encode_octet(self.method.klass.id)
       c.encode_octet(self.method.id)
     else:
@@ -244,7 +250,7 @@
 
   def decode(spec, c, size):
     version = (c.spec.major, c.spec.minor)
-    if version == (0, 10):
+    if version == (0, 10) or version == (99, 0):
       klass = spec.classes.byid[c.decode_octet()]
       meth = klass.methods.byid[c.decode_octet()]
     else:
@@ -315,7 +321,7 @@
     return "[%s] Response(%s,%s,%s) %s" % (self.channel, self.id, self.request_id, self.batch_offset, self.method)
 
 def uses_struct_encoding(spec):
-  return (spec.major == 0 and spec.minor == 10)
+  return (spec.major == 0 and spec.minor == 10) or (spec.major == 99 and spec.minor == 0)
 
 class Header(Frame):
 

Modified: incubator/qpid/trunk/qpid/python/qpid/peer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/peer.py?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/peer.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/peer.py Thu Feb 21 09:40:42 2008
@@ -198,7 +198,7 @@
       self.invoker = self.invoke_reliable
     else:
       self.invoker = self.invoke_method
-    self.use_execution_layer = (spec.major == 0 and spec.minor == 10)
+    self.use_execution_layer = (spec.major == 0 and spec.minor == 10) or (spec.major == 99 and spec.minor == 0)
     self.synchronous = True
 
   def closed(self, reason):

Modified: incubator/qpid/trunk/qpid/python/qpid/testlib.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/testlib.py?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/testlib.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/testlib.py Thu Feb 21 09:40:42 2008
@@ -141,7 +141,7 @@
                 self.tests=findmodules("tests")
             if self.use08spec():
                 self.tests+=findmodules("tests_0-8")
-            elif self.spec.major == 0 and self.spec.minor == 10:
+            elif (self.spec.major == 0 and self.spec.minor == 10) or (self.spec.major == 99 and self.spec.minor == 0):
                 self.tests+=findmodules("tests_0-10")
             else:
                 self.tests+=findmodules("tests_0-9")

Modified: incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml?rev=629883&r1=629882&r2=629883&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml (original)
+++ incubator/qpid/trunk/qpid/specs/amqp.0-10-preview.xml Thu Feb 21 09:40:42 2008
@@ -137,7 +137,7 @@
 -->
 
 <amqp xmlns="http://www.amqp.org/schema/amqp.xsd"
-    major="0" minor="10" port="5672" comment="AMQ Protocol (Working version)">
+    major="99" minor="0" port="5672" comment="AMQ Protocol (Working version)">
 
   <!--
     ======================================================