activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r507307 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/connector/stomp/ main/activemq/connector/stomp/commands/ main/activemq/transport/ main/cms/ test/activemq/connector/openwire/marshal/ test/activemq/connector/stomp/ t...
Date Tue, 13 Feb 2007 23:46:47 GMT
Author: nmittler
Date: Tue Feb 13 15:46:46 2007
New Revision: 507307

URL: http://svn.apache.org/viewvc?view=rev&rev=507307
Log:
[AMQCPP-30] adding toString() to Command interface and removing toString() from Destination
interface

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompDestination.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompQueue.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTopic.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Command.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Destination.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/ResponseCorrelatorTest.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompDestination.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompDestination.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompDestination.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompDestination.h
Tue Feb 13 15:46:46 2007
@@ -52,25 +52,16 @@
                           cms::Destination::DestinationType type ) :
             core::ActiveMQDestination<T>( name, type ){}
 
-        virtual ~StompDestination(void) {}
+        virtual ~StompDestination() {}
 
         /**
          * Retrieves the name of this destination, plus the stomp
          * destination decorator
          * @return name in a format that is used by the broker
          */
-        virtual std::string toProviderString(void) const {
+        virtual std::string toProviderString() const {
             return getPrefix() + core::ActiveMQDestination<T>::getName();
         }
-        
-        /**
-         * Converts the Destination Name into a String minus the 
-         * stomp decorator
-         * @return string name of the desintation
-         */
-        virtual std::string toString(void) const {
-            return core::ActiveMQDestination<T>::getName();
-        }
 
     protected:
     
@@ -79,7 +70,7 @@
          * of Destination
          * @return string prefix
          */
-        virtual std::string getPrefix(void) const = 0;
+        virtual std::string getPrefix() const = 0;
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompQueue.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompQueue.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompQueue.h
Tue Feb 13 15:46:46 2007
@@ -45,15 +45,14 @@
             StompDestination< cms::Queue >( name, cms::Destination::QUEUE )
         {}
 
-        virtual ~StompQueue(void) {}
+        virtual ~StompQueue() {}
 
         /**
          * Gets the name of this queue.
          * @return The queue name.
          */
-        virtual std::string getQueueName(void) const 
-            throw( cms::CMSException ) {
-                return toString();
+        virtual std::string getQueueName() const throw( cms::CMSException ) {
+            return getName();
         }
 
         /**
@@ -61,8 +60,8 @@
          * copy of this one, and returns it.
          * @returns cloned copy of this object
          */
-        virtual cms::Destination* clone(void) const {
-            return new StompQueue( toString() );
+        virtual cms::Destination* clone() const {
+            return new StompQueue( getQueueName() );
         }
 
     protected:
@@ -72,7 +71,7 @@
          * of Destination
          * @return string prefix
          */
-        virtual std::string getPrefix(void) const {
+        virtual std::string getPrefix() const {
             return commands::CommandConstants::queuePrefix;
         }
         

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
Tue Feb 13 15:46:46 2007
@@ -151,7 +151,7 @@
         {
             // Find the right mapping to consumers        
             ConsumerMap& consumerMap = 
-                destinationMap[ destination->toString() ];
+                destinationMap[ destination->toProviderString() ];
 
             // We only need to send a sub request if there are no active 
             // consumers on this destination.  
@@ -231,7 +231,7 @@
         synchronized( &mutex )
         {
             DestinationMap::iterator itr = 
-                destinationMap.find( consumer->getDestination().toString() );
+                destinationMap.find( consumer->getDestination().toProviderString() );
                 
             if( itr == destinationMap.end() )
             {
@@ -293,7 +293,7 @@
         synchronized( &mutex )
         {
             DestinationMap::iterator itr = 
-                destinationMap.find( message->getCMSDestination()->toString() );
+                destinationMap.find( message->getCMSDestination()->toProviderString()
);
 
             if( itr == destinationMap.end() )
             {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTopic.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTopic.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompTopic.h
Tue Feb 13 15:46:46 2007
@@ -45,15 +45,15 @@
             StompDestination< cms::Topic >( name, cms::Destination::TOPIC )
         {}
 
-        virtual ~StompTopic(void) {}
+        virtual ~StompTopic() {}
 
         /**
          * Gets the name of this queue.
          * @return The queue name.
          */
-        virtual std::string getTopicName(void) const 
+        virtual std::string getTopicName() const 
             throw( cms::CMSException ) {
-                return toString();
+                return getName();
         }
 
         /**
@@ -61,8 +61,8 @@
          * copy of this one, and returns it.
          * @returns cloned copy of this object
          */
-        virtual cms::Destination* clone(void) const {
-            return new StompTopic( toString() );
+        virtual cms::Destination* clone() const {
+            return new StompTopic( getTopicName() );
         }
 
     protected:
@@ -72,7 +72,7 @@
          * of Destination
          * @return string prefix
          */
-        virtual std::string getPrefix(void) const {
+        virtual std::string getPrefix() const {
             return commands::CommandConstants::topicPrefix;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/AbstractCommand.h
Tue Feb 13 15:46:46 2007
@@ -24,6 +24,9 @@
 #include <activemq/util/Integer.h>
 #include <activemq/util/Long.h>
 #include <activemq/util/Config.h>
+#include <activemq/util/Character.h>
+#include <typeinfo>
+#include <sstream>
 
 namespace activemq{
 namespace connector{
@@ -108,6 +111,34 @@
          * @returns true if frame is valid
          */
         virtual bool validate( const StompFrame& frame ) const = 0;
+        
+        /**
+         * Returns a provider-specific string that provides information
+         * about the contents of the command.
+         */
+        virtual std::string toString() const {
+            
+            std::ostringstream ostream;
+            ostream << "Class: " << typeid(*this).name() << std::endl;
+            
+            std::string propertyString = getProperties().toString();
+            ostream << "Properties: " << propertyString << std::endl;
+            
+            ostream << "Body: " << std::endl;
+            
+            const std::vector<unsigned char>& bytes = getBytes();
+            
+            for( std::size_t ix=0; ix<bytes.size(); ++ix ){
+                char c = (char)bytes[ix];
+                if( util::Character::isLetterOrDigit(c) || util::Character::isWhitespace(c)
){
+                    ostream << c;
+                }
+                else 
+                    ostream << "[" << (int)(unsigned char)c << "]";
+            }
+            
+            return ostream.str();
+        }
         
     public:
     

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Command.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Command.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Command.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Command.h Tue Feb
13 15:46:46 2007
@@ -18,13 +18,15 @@
 #ifndef ACTIVEMQ_TRANSPORT_COMMAND_H_
 #define ACTIVEMQ_TRANSPORT_COMMAND_H_
 
+#include <string>
+
 namespace activemq{
 namespace transport{
   
     class Command{
     public:
   
-        virtual ~Command(void){}
+        virtual ~Command(){}
         
         /**
          * Sets the Command Id of this Message
@@ -49,6 +51,12 @@
          * @return true if a response is required.
          */
         virtual bool isResponseRequired() const = 0;
+        
+        /**
+         * Returns a provider-specific string that provides information
+         * about the contents of the command.
+         */
+        virtual std::string toString() const = 0;
         
     };
     

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Destination.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Destination.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Destination.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Destination.h Tue Feb 13 15:46:46
2007
@@ -50,17 +50,13 @@
          * @return The Destination Type
          */
         virtual DestinationType getDestinationType() const = 0;
-        
-        /**
-         * Converts the Destination Name into a String 
-         * @return string name
-         */
-        virtual std::string toString() const = 0;
 
         /**
          * Converts the Destination to a String value representing the
-         * Provider specific name fot this destination, which is not
-         * necessarily equal to the User Supplied name of the Destination
+         * Provider specific name for this destination.  This name must
+         * uniquely identify a particular destination.  For example, a topic
+         * and a queue both named "FOO" must not have equivalent provider
+         * strings.
          * @return Provider specific Name
          */
         virtual std::string toProviderString() const = 0;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp
Tue Feb 13 15:46:46 2007
@@ -122,7 +122,7 @@
     CPPUNIT_ASSERT( ds.cachedChild->intValue == dataStructure->cachedChild->intValue
);
     CPPUNIT_ASSERT( ds.cachedChild->floatValue == dataStructure->cachedChild->floatValue
);
     CPPUNIT_ASSERT( ds.cachedChild->doubleValue == dataStructure->cachedChild->doubleValue
);
-    printf("string1[%s,%d] string2[%s,%d]\n",ds.cachedChild->stringValue.c_str(), (int)ds.cachedChild->stringValue.size(),
dataStructure->cachedChild->stringValue.c_str(), dataStructure->cachedChild->stringValue.size()
);
+    printf("string1[%s,%d] string2[%s,%d]\n",ds.cachedChild->stringValue.c_str(), (int)ds.cachedChild->stringValue.size(),
dataStructure->cachedChild->stringValue.c_str(), (int)dataStructure->cachedChild->stringValue.size()
);
     CPPUNIT_ASSERT( ds.cachedChild->stringValue == dataStructure->cachedChild->stringValue
);
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
Tue Feb 13 15:46:46 2007
@@ -156,7 +156,7 @@
             StompTopic dest1( "dummy.topic.1" );
             ConsumerInfo* cinfo1 = connector->createConsumer( &dest1, info1, sel1
);
             CPPUNIT_ASSERT( cinfo1->getSessionInfo() == info1 );
-            CPPUNIT_ASSERT( cinfo1->getDestination().toString() == dest1.toString() );
+            CPPUNIT_ASSERT( cinfo1->getDestination().toProviderString() == dest1.toProviderString()
);
             CPPUNIT_ASSERT( cinfo1->getMessageSelector() == sel1 );
             
             SessionInfo* info2 = connector->createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
@@ -164,7 +164,7 @@
             StompTopic dest2( "dummy.topic.2" );
             ConsumerInfo* cinfo2 = connector->createConsumer( &dest2, info2, sel2
);
             CPPUNIT_ASSERT( cinfo2->getSessionInfo() == info2 );
-            CPPUNIT_ASSERT( cinfo2->getDestination().toString() == dest2.toString() );
+            CPPUNIT_ASSERT( cinfo2->getDestination().toProviderString() == dest2.toProviderString()
);
             CPPUNIT_ASSERT( cinfo2->getMessageSelector() == sel2 );
             
             SessionInfo* info3 = connector->createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
@@ -172,7 +172,7 @@
             StompQueue dest3( "dummy.queue.1" );
             ConsumerInfo* cinfo3 = connector->createConsumer( &dest3, info3, sel3
);
             CPPUNIT_ASSERT( cinfo3->getSessionInfo() == info3 );
-            CPPUNIT_ASSERT( cinfo3->getDestination().toString() == dest3.toString() );
+            CPPUNIT_ASSERT( cinfo3->getDestination().toProviderString() == dest3.toProviderString()
);
             CPPUNIT_ASSERT( cinfo3->getMessageSelector() == sel3 );
             
             SessionInfo* info4 = connector->createSession( cms::Session::SESSION_TRANSACTED
);
@@ -180,7 +180,7 @@
             StompTopic dest4( "dummy.queue.2" );
             ConsumerInfo* cinfo4 = connector->createConsumer( &dest4, info4, sel4
);
             CPPUNIT_ASSERT( cinfo4->getSessionInfo() == info4 );
-            CPPUNIT_ASSERT( cinfo4->getDestination().toString() == dest4.toString() );
+            CPPUNIT_ASSERT( cinfo4->getDestination().toProviderString() == dest4.toProviderString()
);
             CPPUNIT_ASSERT( cinfo4->getMessageSelector() == sel4 );
             
             connector->destroyResource( cinfo1 );
@@ -215,25 +215,25 @@
             StompTopic dest1( "dummy.topic.1" );
             ProducerInfo* pinfo1 = connector->createProducer( &dest1, info1 );
             CPPUNIT_ASSERT( pinfo1->getSessionInfo() == info1 );
-            CPPUNIT_ASSERT( pinfo1->getDestination().toString() == dest1.toString() );
+            CPPUNIT_ASSERT( pinfo1->getDestination().toProviderString() == dest1.toProviderString()
);
             
             SessionInfo* info2 = connector->createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
             StompTopic dest2( "dummy.topic.2" );
             ProducerInfo* pinfo2 = connector->createProducer( &dest2, info2 );
             CPPUNIT_ASSERT( pinfo2->getSessionInfo() == info2 );
-            CPPUNIT_ASSERT( pinfo2->getDestination().toString() == dest2.toString() );
+            CPPUNIT_ASSERT( pinfo2->getDestination().toProviderString() == dest2.toProviderString()
);
             
             SessionInfo* info3 = connector->createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
             StompQueue dest3( "dummy.queue.1" );
             ProducerInfo* pinfo3 = connector->createProducer( &dest3, info3 );
             CPPUNIT_ASSERT( pinfo3->getSessionInfo() == info3 );
-            CPPUNIT_ASSERT( pinfo3->getDestination().toString() == dest3.toString() );
+            CPPUNIT_ASSERT( pinfo3->getDestination().toProviderString() == dest3.toProviderString()
);
             
             SessionInfo* info4 = connector->createSession( cms::Session::SESSION_TRANSACTED
);
             StompTopic dest4( "dummy.queue.2" );
             ProducerInfo* pinfo4 = connector->createProducer( &dest4, info4 );
             CPPUNIT_ASSERT( pinfo4->getSessionInfo() == info4 );
-            CPPUNIT_ASSERT( pinfo4->getDestination().toString() == dest4.toString() );
+            CPPUNIT_ASSERT( pinfo4->getDestination().toProviderString() == dest4.toProviderString()
);
             
             connector->destroyResource( pinfo1 );
             connector->destroyResource( pinfo2 );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
Tue Feb 13 15:46:46 2007
@@ -148,7 +148,7 @@
             StompTopic dest1( "dummy.topic.1" );
             ConsumerInfo* cinfo1 = manager.createConsumer( &dest1, info1, sel1 );
             CPPUNIT_ASSERT( cinfo1->getSessionInfo() == info1 );
-            CPPUNIT_ASSERT( cinfo1->getDestination().toString() == dest1.toString() );
+            CPPUNIT_ASSERT( cinfo1->getDestination().toProviderString() == dest1.toProviderString()
);
             CPPUNIT_ASSERT( cinfo1->getMessageSelector() == sel1 );
             
             SessionInfo* info2 = manager.createSession( cms::Session::DUPS_OK_ACKNOWLEDGE
);
@@ -156,7 +156,7 @@
             StompTopic dest2( "dummy.topic.2" );
             ConsumerInfo* cinfo2 = manager.createConsumer( &dest2, info2, sel2 );
             CPPUNIT_ASSERT( cinfo2->getSessionInfo() == info2 );
-            CPPUNIT_ASSERT( cinfo2->getDestination().toString() == dest2.toString() );
+            CPPUNIT_ASSERT( cinfo2->getDestination().toProviderString() == dest2.toProviderString()
);
             CPPUNIT_ASSERT( cinfo2->getMessageSelector() == sel2 );
             
             SessionInfo* info3 = manager.createSession( cms::Session::CLIENT_ACKNOWLEDGE
);
@@ -164,7 +164,7 @@
             StompQueue dest3( "dummy.queue.1" );
             ConsumerInfo* cinfo3 = manager.createConsumer( &dest3, info3, sel3 );
             CPPUNIT_ASSERT( cinfo3->getSessionInfo() == info3 );
-            CPPUNIT_ASSERT( cinfo3->getDestination().toString() == dest3.toString() );
+            CPPUNIT_ASSERT( cinfo3->getDestination().toProviderString() == dest3.toProviderString()
);
             CPPUNIT_ASSERT( cinfo3->getMessageSelector() == sel3 );
             
             SessionInfo* info4 = manager.createSession( cms::Session::SESSION_TRANSACTED
);
@@ -172,7 +172,7 @@
             StompTopic dest4( "dummy.queue.2" );
             ConsumerInfo* cinfo4 = manager.createConsumer( &dest4, info4, sel4 );
             CPPUNIT_ASSERT( cinfo4->getSessionInfo() == info4 );
-            CPPUNIT_ASSERT( cinfo4->getDestination().toString() == dest4.toString() );
+            CPPUNIT_ASSERT( cinfo4->getDestination().toProviderString() == dest4.toProviderString()
);
             CPPUNIT_ASSERT( cinfo4->getMessageSelector() == sel4 );
             
             delete info1;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.h
Tue Feb 13 15:46:46 2007
@@ -86,8 +86,8 @@
                             "ID:123456" );
             StompTopic topic("testTopic");
             cmd.setCMSDestination( &topic );
-            CPPUNIT_ASSERT( cmd.getCMSDestination()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSDestination()->toProviderString() == 
+                            "/topic/testTopic" );
             
             StompFrame* frame = cmd.marshal().clone();
             
@@ -123,8 +123,8 @@
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == 
                             cms::DeliveryMode::NON_PERSISTENT );
             cmd.setCMSDestination( &topic );
-            CPPUNIT_ASSERT( cmd.getCMSDestination()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSDestination()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
             cmd.setCMSExpiration( 123 );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
@@ -140,8 +140,8 @@
             CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
             CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
             cmd.setCMSReplyTo( &topic );
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
             cmd.setCMSTimeStamp( 123 );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
@@ -169,7 +169,7 @@
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == cmd2->getCMSExpiration() );
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == cmd2->getCMSDeliveryMode() );
             CPPUNIT_ASSERT( std::string(cmd.getCMSCorrelationId()) == cmd2->getCMSCorrelationId()
);
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == cmd2->getCMSReplyTo()->toString()
);
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == cmd2->getCMSReplyTo()->toProviderString()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageType()) == cmd2->getCMSMessageType()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageId()) == cmd2->getCMSMessageId()
);
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/MessageCommandTest.h
Tue Feb 13 15:46:46 2007
@@ -124,8 +124,8 @@
             cmd.setCMSDeliveryMode( cms::DeliveryMode::NON_PERSISTENT );
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == 
                             cms::DeliveryMode::NON_PERSISTENT );
-            CPPUNIT_ASSERT( cmd.getCMSDestination()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSDestination()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
             cmd.setCMSExpiration( 123 );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
@@ -141,8 +141,8 @@
             CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
             CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
             cmd.setCMSReplyTo( &topic );
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
             cmd.setCMSTimeStamp( 123 );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
@@ -161,7 +161,7 @@
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == cmd2->getCMSExpiration() );
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == cmd2->getCMSDeliveryMode() );
             CPPUNIT_ASSERT( std::string(cmd.getCMSCorrelationId()) == cmd2->getCMSCorrelationId()
);
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == cmd2->getCMSReplyTo()->toString()
);
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == cmd2->getCMSReplyTo()->toProviderString()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageType()) == cmd2->getCMSMessageType()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageId()) == cmd2->getCMSMessageId()
);
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.h
Tue Feb 13 15:46:46 2007
@@ -119,8 +119,8 @@
             cmd.setCMSDeliveryMode( cms::DeliveryMode::NON_PERSISTENT );
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == 
                             cms::DeliveryMode::NON_PERSISTENT );
-            CPPUNIT_ASSERT( cmd.getCMSDestination()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSDestination()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 0 );
             cmd.setCMSExpiration( 123 );
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == 123 );
@@ -136,8 +136,8 @@
             CPPUNIT_ASSERT( cmd.getCMSRedelivered() == true );
             CPPUNIT_ASSERT( cmd.getCMSReplyTo() == NULL );
             cmd.setCMSReplyTo( &topic );
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == 
-                            "testTopic" );
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == 
+                            "/topic/testTopic" );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 0 );
             cmd.setCMSTimeStamp( 123 );
             CPPUNIT_ASSERT( cmd.getCMSTimeStamp() == 123 );
@@ -160,7 +160,7 @@
             CPPUNIT_ASSERT( cmd.getCMSExpiration() == cmd2->getCMSExpiration() );
             CPPUNIT_ASSERT( cmd.getCMSDeliveryMode() == cmd2->getCMSDeliveryMode() );
             CPPUNIT_ASSERT( std::string(cmd.getCMSCorrelationId()) == cmd2->getCMSCorrelationId()
);
-            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toString() == cmd2->getCMSReplyTo()->toString()
);
+            CPPUNIT_ASSERT( cmd.getCMSReplyTo()->toProviderString() == cmd2->getCMSReplyTo()->toProviderString()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageType()) == cmd2->getCMSMessageType()
);
             CPPUNIT_ASSERT( std::string(cmd.getCMSMessageId()) == cmd2->getCMSMessageId()
);
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.h
Tue Feb 13 15:46:46 2007
@@ -60,6 +60,7 @@
             
             virtual void setResponseRequired( const bool required AMQCPP_UNUSED){}
             virtual bool isResponseRequired() const{ return false; }
+            virtual std::string toString() const{ return ""; }
         };
         
         class MyCommandListener : public CommandListener{

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/ResponseCorrelatorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/ResponseCorrelatorTest.h?view=diff&rev=507307&r1=507306&r2=507307
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/ResponseCorrelatorTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/ResponseCorrelatorTest.h
Tue Feb 13 15:46:46 2007
@@ -65,6 +65,8 @@
             virtual bool isResponseRequired() const{
                 return responseRequired;
             }
+            
+            virtual std::string toString() const{ return ""; }
         };
         
         class MyResponse : public Response{
@@ -96,6 +98,8 @@
             virtual void setCorrelationId( int corrId ){
                 this->corrId = corrId;
             }
+            
+            virtual std::string toString() const{ return ""; }
         };
         
         class MyExceptionResponse : public ExceptionResponse{
@@ -131,6 +135,8 @@
             virtual const BrokerError* getException() const{
                 return &error;
             }
+            
+            virtual std::string toString() const{ return ""; }
         };
         
         class MyTransport 



Mime
View raw message