You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/04/16 17:47:07 UTC

svn commit: r1094010 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/cmsutil/ main/activemq/core/ main/cms/ test/activemq/cmsutil/

Author: tabish
Date: Sat Apr 16 15:47:06 2011
New Revision: 1094010

URL: http://svn.apache.org/viewvc?rev=1094010&view=rev
Log: (empty)

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MessageConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Session.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h Sat Apr 16 15:47:06 2011
@@ -52,6 +52,14 @@ namespace cmsutil {
             // Do nothing.
         }
 
+        virtual void start() {
+            consumer->start();
+        }
+
+        virtual void stop() {
+            consumer->stop();
+        }
+
         virtual cms::Message* receive() {
             return consumer->receive();
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h Sat Apr 16 15:47:06 2011
@@ -85,6 +85,14 @@ namespace cmsutil {
          */
         virtual void close();
 
+        virtual void start() {
+            session->start();
+        }
+
+        virtual void stop() {
+            session->stop();
+        }
+
         virtual void commit() {
             session->commit();
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h Sat Apr 16 15:47:06 2011
@@ -151,12 +151,12 @@ namespace core{
         /**
          * Stops asynchronous message delivery.
          */
-        void start();
+        virtual void start();
 
         /**
          * Starts asynchronous message delivery.
          */
-        void stop();
+        virtual void stop();
 
         /**
          * Indicates whether or not the session is currently in the started

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MessageConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MessageConsumer.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MessageConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MessageConsumer.h Sat Apr 16 15:47:06 2011
@@ -22,6 +22,8 @@
 #include <cms/MessageListener.h>
 #include <cms/Message.h>
 #include <cms/Closeable.h>
+#include <cms/Startable.h>
+#include <cms/Stoppable.h>
 
 namespace cms{
 
@@ -47,11 +49,15 @@ namespace cms{
      * operation completes.  A blocked consumer in a <code>receive</code> call will
      * return a Null when the close method is called.
      *
+     * While the MessageConsumer implements the Startable and Stoppable interfaces it is
+     * not required to implement these methods and can throw an UnsupportedOperation
+     * exception if they are not available for the given CMS provider.
+     *
      * @see MessageListener
      *
      * @since 1.0
      */
-    class CMS_API MessageConsumer : public Closeable {
+    class CMS_API MessageConsumer : public Closeable, public Startable, public Stoppable {
     public:
 
         virtual ~MessageConsumer() throw();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Session.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Session.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Session.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Session.h Sat Apr 16 15:47:06 2011
@@ -19,6 +19,8 @@
 
 #include <cms/Config.h>
 #include <cms/Closeable.h>
+#include <cms/Startable.h>
+#include <cms/Stoppable.h>
 #include <cms/Message.h>
 #include <cms/TextMessage.h>
 #include <cms/BytesMessage.h>
@@ -92,9 +94,13 @@ namespace cms{
      * being redelivered to the client, the Provider may allow configuration that limits the
      * Maximum number of redeliveries for a Message.
      *
+     * While the Session interface implements the Startable and Stoppable interfaces it is
+     * not required to implement these methods and can throw an UnsupportedOperation
+     * exception if they are not available for the given CMS provider.
+     *
      * @since 1.0
      */
-    class CMS_API Session : public Closeable {
+    class CMS_API Session : public Closeable, public Startable, public Stoppable {
     public:
 
         enum AcknowledgeMode {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h Sat Apr 16 15:47:06 2011
@@ -43,7 +43,11 @@ namespace cmsutil {
         }
         virtual ~DummyConsumer() throw() {}
 
-        virtual void close() throw( cms::CMSException ){}
+        virtual void close() {}
+
+        virtual void start() {}
+
+        virtual void stop() {}
 
         virtual cms::Message* receive() throw ( cms::CMSException ) {
             return messageContext->receive(dest, selector, noLocal, 0);

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h?rev=1094010&r1=1094009&r2=1094010&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h Sat Apr 16 15:47:06 2011
@@ -45,13 +45,17 @@ namespace cmsutil {
 
         virtual ~DummySession() throw() {}
 
-        virtual void close() throw( cms::CMSException ){}
+        virtual void close() {}
 
-        virtual void commit() throw ( cms::CMSException ) {}
+        virtual void start() {}
 
-        virtual void rollback() throw ( cms::CMSException ) {}
+        virtual void stop() {}
 
-        virtual void recover() throw ( cms::CMSException ) {}
+        virtual void commit() {}
+
+        virtual void rollback() {}
+
+        virtual void recover() {}
 
         virtual cms::MessageConsumer* createConsumer(
             const cms::Destination* destination )