activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r548143 - in /activemq/activemq-cpp/trunk/src: main/ main/activemq/connector/openwire/ main/activemq/support/ main/activemq/transport/ test/ test/activemq/connector/stomp/ test/activemq/core/ test/activemq/transport/
Date Mon, 18 Jun 2007 00:07:34 GMT
Author: tabish
Date: Sun Jun 17 17:07:33 2007
New Revision: 548143

URL: http://svn.apache.org/viewvc?view=rev&rev=548143
Log:
http://issues.apache.org/activemq/browse/AMQCPP-130

Adding start of OpenWireResponseBuilder

Removed:
    activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompResponseBuilder.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompResponseBuilder.h
    activemq/activemq-cpp/trunk/src/test/activemq/transport/DummyTransport.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/transport/DummyTransport.h
    activemq/activemq-cpp/trunk/src/test/activemq/transport/DummyTransportFactory.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/transport/DummyTransportFactory.h
Modified:
    activemq/activemq-cpp/trunk/src/main/Makefile.am
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
    activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h
    activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h
    activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp
    activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h
    activemq/activemq-cpp/trunk/src/test/Makefile.am
    activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.h
    activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.h
    activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp
    activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h

Modified: activemq/activemq-cpp/trunk/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/Makefile.am?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/main/Makefile.am Sun Jun 17 17:07:33 2007
@@ -54,6 +54,7 @@
     activemq/connector/stomp/StompConnector.cpp \
     activemq/connector/stomp/StompSelector.cpp \
     activemq/connector/stomp/StompConnectionNegotiator.cpp \
+    activemq/connector/stomp/StompResponseBuilder.cpp \
     activemq/connector/openwire/OpenWireFormat.cpp \
     activemq/connector/openwire/OpenWireFormatFactory.cpp \
     activemq/connector/openwire/OpenWireCommandReader.cpp \
@@ -61,6 +62,7 @@
     activemq/connector/openwire/OpenWireFormatNegotiator.cpp \
     activemq/connector/openwire/OpenWireConnector.cpp \
     activemq/connector/openwire/OpenWireConnectorFactory.cpp \
+    activemq/connector/openwire/OpenWireResponseBuilder.cpp \
     activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp \
     activemq/connector/openwire/utils/HexTable.cpp \
     activemq/connector/openwire/utils/BooleanStream.cpp \
@@ -80,6 +82,8 @@
     activemq/transport/TransportFilter.cpp \
     activemq/transport/IOTransportFactory.cpp \
     activemq/transport/IOTransport.cpp \
+    activemq/transport/MockTransport.cpp \
+    activemq/transport/MockTransportFactory.cpp \
     activemq/transport/filters/ResponseCorrelator.cpp \
     activemq/transport/filters/ResponseCorrelatorFactory.cpp \
     activemq/transport/filters/AsyncSendTransport.cpp \
@@ -216,6 +220,7 @@
     activemq/connector/stomp/StompConnector.h \
     activemq/connector/stomp/StompDestination.h \
     activemq/connector/stomp/StompTopic.h \
+    activemq/connector/stomp/StompResponseBuilder.h \
     activemq/connector/openwire/OpenWireFormat.h \
     activemq/connector/openwire/OpenWireCommandReader.h \
     activemq/connector/openwire/OpenWireCommandWriter.h \
@@ -224,6 +229,7 @@
     activemq/connector/openwire/OpenWireProducerInfo.h \
     activemq/connector/openwire/OpenWireSessionInfo.h \
     activemq/connector/openwire/OpenWireTransactionInfo.h \
+    activemq/connector/openwire/OpenWireResponseBuilder.h \
     activemq/connector/openwire/BrokerException.h \
     activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h \
     activemq/connector/openwire/utils/HexTable.h \
@@ -259,6 +265,8 @@
     activemq/transport/CommandIOException.h \
     activemq/transport/IOTransportFactory.h \
     activemq/transport/IOTransport.h \
+    activemq/transport/MockTransport.h \
+    activemq/transport/MockTransportFactory.h \
     activemq/transport/filters/FutureResponse.h \
     activemq/transport/filters/ResponseCorrelator.h \
     activemq/transport/filters/ResponseCorrelatorFactory.h \

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
Sun Jun 17 17:07:33 2007
@@ -41,7 +41,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Command* OpenWireResponseBuilder::buildIncomingCommand(
-    const transport::Command* cmd ){
+    const transport::Command* cmd AMQCPP_UNUSED ){
 
 //    const commands::ConnectCommand* connectCommand =
 //        dynamic_cast<const commands::ConnectCommand*>(cmd);

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
(original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
Sun Jun 17 17:07:33 2007
@@ -22,7 +22,7 @@
 
 namespace activemq{
 namespace connector{
-namespace stomp{
+namespace openwire{
 
     class OpenWireResponseBuilder : public transport::MockTransport::ResponseBuilder{
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp Sun Jun 17 17:07:33
2007
@@ -18,6 +18,7 @@
 
 #include <activemq/logger/LogWriter.h>
 #include <activemq/transport/IOTransportFactory.h>
+#include <activemq/transport/MockTransportFactory.h>
 #include <activemq/transport/filters/AsyncSendTransportFactory.h>
 #include <activemq/transport/filters/TcpTransportFactory.h>
 #include <activemq/transport/filters/LoggingTransportFactory.h>
@@ -43,6 +44,7 @@
         transport::filters::LoggingTransportFactory::getInstance();
         transport::filters::ResponseCorrelatorFactory::getInstance();
         transport::IOTransportFactory::getInstance();
+        transport::MockTransportFactory::getInstance();
     }
 
     refCount++;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h Sun Jun 17
17:07:33 2007
@@ -53,7 +53,7 @@
          * Returns a reference to this TransportFactory
          * @returns TransportFactory Reference
          */
-        static TransportFactory& getInstance(void);
+        static TransportFactory& getInstance();
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h Sun Jun 17 17:07:33
2007
@@ -82,7 +82,7 @@
                 delete response;
             }
 
-            void setTransport( DummyTransport* transport ){
+            void setTransport( MockTransport* transport ){
                 this->transport = transport;
             }
 
@@ -145,7 +145,7 @@
         concurrent::Mutex commandIdMutex;
         bool own;
         InternalCommandListener defaultListener;
-        static DummyTransport* instance;
+        static MockTransport* instance;
 
     public:
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp Sun Jun
17 17:07:33 2007
@@ -18,6 +18,8 @@
 #include "MockTransportFactory.h"
 #include <activemq/connector/stomp/StompResponseBuilder.h>
 #include <activemq/transport/MockTransport.h>
+#include <activemq/transport/MockTransportFactory.h>
+#include <activemq/transport/TransportFactoryMapRegistrar.h>
 
 using namespace activemq;
 using namespace activemq::transport;
@@ -47,4 +49,14 @@
     }
 
     return new MockTransport( builder, true, true );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+TransportFactory& MockTransportFactory::getInstance() {
+
+    // Create the one and only instance of the registrar
+    static TransportFactoryMapRegistrar registrar(
+        "mock", new MockTransportFactory() );
+
+    return registrar.getFactory();
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h Sun Jun
17 17:07:33 2007
@@ -41,6 +41,12 @@
             Transport* next = NULL,
             bool own = true ) throw ( exceptions::ActiveMQException );
 
+        /**
+         * Returns a reference to this TransportFactory
+         * @returns TransportFactory Reference
+         */
+        static TransportFactory& getInstance();
+
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/Makefile.am?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/test/Makefile.am Sun Jun 17 17:07:33 2007
@@ -38,7 +38,6 @@
   activemq/connector/stomp/commands/TextMessageCommandTest.cpp \
   activemq/connector/stomp/commands/UnsubscribeCommandTest.cpp \
   activemq/connector/stomp/marshal/MarshalerTest.cpp \
-  activemq/connector/stomp/StompResponseBuilder.cpp \
   activemq/connector/stomp/StompCommandReaderTest.cpp \
   activemq/connector/stomp/StompCommandWriterTest.cpp \
   activemq/connector/stomp/StompConnectorTest.cpp \
@@ -77,8 +76,6 @@
   activemq/logger/LoggerTest.cpp \
   activemq/network/SocketFactoryTest.cpp \
   activemq/network/SocketTest.cpp \
-  activemq/transport/DummyTransport.cpp \
-  activemq/transport/DummyTransportFactory.cpp \
   activemq/transport/IOTransportTest.cpp \
   activemq/transport/filters/ResponseCorrelatorTest.cpp \
   activemq/transport/TransportFactoryMapRegistrarTest.cpp \

Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp Sun
Jun 17 17:07:33 2007
@@ -28,7 +28,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     util::Properties properties;
 
     // Using a pointer for the connector so we ensure the proper destruction
@@ -67,7 +67,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     util::Properties properties;
 
     // Using a pointer for the connector so we ensure the proper destruction
@@ -131,7 +131,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     util::Properties properties;
 
     // Using a pointer for the connector so we ensure the proper destruction
@@ -183,7 +183,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     util::Properties properties;
 
     // Using a pointer for the connector so we ensure the proper destruction
@@ -269,7 +269,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     util::Properties properties;
     StompConnector* connector =
         new StompConnector( &transport, properties );
@@ -313,7 +313,7 @@
 {
     std::string connectionId = "testConnectionId";
     StompResponseBuilder responseBuilder("testConnectionId");
-    transport::DummyTransport transport( &responseBuilder );
+    transport::MockTransport transport( &responseBuilder );
     MyExceptionListener exListener;
     util::Properties properties;
 

Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.h Sun
Jun 17 17:07:33 2007
@@ -29,7 +29,7 @@
 #include <activemq/connector/stomp/commands/BytesMessageCommand.h>
 #include <activemq/connector/stomp/StompTopic.h>
 #include <activemq/connector/stomp/StompQueue.h>
-#include <activemq/transport/DummyTransport.h>
+#include <activemq/transport/MockTransport.h>
 #include <activemq/util/Config.h>
 
 #include <activemq/io/ByteArrayOutputStream.h>

Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.h
(original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.h
Sun Jun 17 17:07:33 2007
@@ -26,7 +26,7 @@
 #include <activemq/connector/stomp/StompConnector.h>
 #include <activemq/connector/stomp/StompTopic.h>
 #include <activemq/connector/stomp/StompQueue.h>
-#include <activemq/transport/DummyTransport.h>
+#include <activemq/transport/MockTransport.h>
 #include <activemq/connector/stomp/commands/TextMessageCommand.h>
 #include <activemq/connector/stomp/commands/SubscribeCommand.h>
 #include <activemq/transport/CommandListener.h>
@@ -111,7 +111,7 @@
         {
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testConnectionId");
-            transport::DummyTransport transport( &responseBuilder );
+            transport::MockTransport transport( &responseBuilder );
             util::Properties properties;
 
             // Using a pointer for the connector so we ensure the proper destruction
@@ -139,7 +139,7 @@
             delete info2;
             delete info3;
             delete info4;
-            
+
             delete connector;
         }
 
@@ -147,7 +147,7 @@
         {
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testConnectionId");
-            transport::DummyTransport transport( &responseBuilder );
+            transport::MockTransport transport( &responseBuilder );
             util::Properties properties;
 
             // Using a pointer for the connector so we ensure the proper destruction
@@ -200,7 +200,7 @@
             delete cinfo2;
             delete cinfo3;
             delete cinfo4;
-            
+
             delete connector;
         }
 
@@ -208,7 +208,7 @@
         {
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testConnectionId");
-            transport::DummyTransport transport( &responseBuilder );
+            transport::MockTransport transport( &responseBuilder );
             util::Properties properties;
 
             // Using a pointer for the connector so we ensure the proper destruction
@@ -272,7 +272,7 @@
             delete cinfo2;
             delete cinfo3;
             delete cinfo4;
-            
+
             delete connector;
         }
 
@@ -280,7 +280,7 @@
 
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testConnectionId");
-            transport::DummyTransport transport( &responseBuilder );
+            transport::MockTransport transport( &responseBuilder );
             util::Properties properties;
 
             // Using a pointer for the connector so we ensure the proper destruction
@@ -320,7 +320,7 @@
 
             delete cinfo1;
             delete cinfo2;
-            
+
             delete connector;
         }
 
@@ -328,7 +328,7 @@
 
             std::string connectionId = "testConnectionId";
             StompResponseBuilder responseBuilder("testConnectionId");
-            transport::DummyTransport transport( &responseBuilder );
+            transport::MockTransport transport( &responseBuilder );
             util::Properties properties;
 
             // Using a pointer for the connector so we ensure the proper destruction
@@ -363,7 +363,7 @@
 
             cmdListener.expected.clear();
             StompTopic dest1( "dummy.topic.1" );
-            
+
             consumer = manager.createConsumer( &dest1, session, "" );
             manager.startConsumer( consumer );
             CPPUNIT_ASSERT( consumer != NULL );
@@ -378,7 +378,7 @@
             cmdListener.expected.clear();
             cmdListener.expected.push_back( retroactive );
             StompTopic dest2( "dummy.topic.1?consumer.retroactive=true" );
-            
+
             consumer = manager.createConsumer( &dest2, session, "" );
             manager.startConsumer( consumer );
             CPPUNIT_ASSERT( consumer != NULL );
@@ -409,7 +409,7 @@
                 "consumer.selector=" + selector.second + "&" +
                 "consumer.exclusive=" + exclusive.second + "&" +
                 "consumer.priority=" + priority.second );
-            
+
             consumer = manager.createConsumer( &dest3, session, "" );
             manager.startConsumer( consumer );
             CPPUNIT_ASSERT( consumer != NULL );
@@ -439,12 +439,12 @@
                 "consumer.selector=" + selector.second + "&" +
                 "consumer.exclusive=" + exclusive.second + "&" +
                 "consumer.priority=" + priority.second );
-            
+
             consumer = manager.createConsumer( &dest4, session, "", true );
             manager.startConsumer( consumer );
             CPPUNIT_ASSERT( consumer != NULL );
             CPPUNIT_ASSERT( cmdListener.subscribe != NULL );
-            
+
             manager.removeConsumer( consumer );
             CPPUNIT_ASSERT( cmdListener.cmd != NULL );
             delete consumer;
@@ -453,7 +453,7 @@
 
             // Done
             delete session;
-            
+
             delete connector;
 
         }

Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp Sun
Jun 17 17:07:33 2007
@@ -26,7 +26,7 @@
 #include <activemq/core/ActiveMQConnection.h>
 #include <cms/Connection.h>
 #include <activemq/transport/TransportFactoryMapRegistrar.h>
-#include <activemq/transport/DummyTransportFactory.h>
+#include <activemq/transport/MockTransportFactory.h>
 #include <activemq/connector/Connector.h>
 
 using namespace activemq;
@@ -37,11 +37,8 @@
 {
     try
     {
-        transport::TransportFactoryMapRegistrar registrar(
-            "dummy", new transport::DummyTransportFactory() );
-
         std::string URI =
-            "dummy://127.0.0.1:23232&wireFormat=stomp";
+            "mock://127.0.0.1:23232&wireFormat=stomp";
 
         ActiveMQConnectionFactory connectionFactory( URI );
 
@@ -65,11 +62,8 @@
 {
     try
     {
-        transport::TransportFactoryMapRegistrar registrar(
-            "dummy", new transport::DummyTransportFactory() );
-
         std::string URI = std::string() +
-            "dummy://127.0.0.1:23232&wireFormat=stomp?"
+            "mock://127.0.0.1:23232&wireFormat=stomp?"
             "username=" + username + "?password=" + password +
             "?client-id=" + clientId;
 

Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp Sun Jun
17 17:07:33 2007
@@ -23,12 +23,12 @@
 #include <activemq/concurrent/Mutex.h>
 #include <activemq/concurrent/Thread.h>
 #include <activemq/core/ActiveMQConnectionFactory.h>
-#include <activemq/transport/DummyTransport.h>
+#include <activemq/transport/MockTransport.h>
 #include <activemq/core/ActiveMQConnection.h>
 #include <activemq/core/ActiveMQConnectionData.h>
 #include <activemq/connector/stomp/StompConnector.h>
 #include <activemq/util/Properties.h>
-#include <activemq/transport/DummyTransportFactory.h>
+#include <activemq/transport/MockTransportFactory.h>
 #include <activemq/transport/TransportFactoryMap.h>
 #include <activemq/transport/TransportFactoryMapRegistrar.h>
 #include <activemq/connector/stomp/StompConsumerInfo.h>
@@ -47,9 +47,6 @@
 {
     try
     {
-        transport::TransportFactoryMapRegistrar registrar(
-            "dummy", new transport::DummyTransportFactory() );
-
         MyMessageListener listener;
         MyExceptionListener exListener;
         MyCommandListener cmdListener;
@@ -61,7 +58,7 @@
 
         transport::TransportFactory* factory =
             transport::TransportFactoryMap::getInstance().lookup(
-                "dummy" );
+                "mock" );
         if( factory == NULL ){
             CPPUNIT_ASSERT( false );
         }
@@ -72,8 +69,8 @@
             CPPUNIT_ASSERT( false );
         }
 
-        transport::DummyTransport* dTransport =
-            dynamic_cast< transport::DummyTransport*>( transport );
+        transport::MockTransport* dTransport =
+            dynamic_cast< transport::MockTransport*>( transport );
 
         CPPUNIT_ASSERT( dTransport != NULL );
 
@@ -186,9 +183,6 @@
 {
     try
     {
-        transport::TransportFactoryMapRegistrar registrar(
-            "dummy", new transport::DummyTransportFactory() );
-
         MyMessageListener listener;
         MyExceptionListener exListener;
         MyCommandListener cmdListener;
@@ -200,7 +194,7 @@
 
         transport::TransportFactory* factory =
             transport::TransportFactoryMap::getInstance().lookup(
-                "dummy" );
+                "mock" );
         if( factory == NULL ){
             CPPUNIT_ASSERT( false );
         }
@@ -211,8 +205,8 @@
             CPPUNIT_ASSERT( false );
         }
 
-        transport::DummyTransport* dTransport =
-            dynamic_cast< transport::DummyTransport*>( transport );
+        transport::MockTransport* dTransport =
+            dynamic_cast< transport::MockTransport*>( transport );
 
         CPPUNIT_ASSERT( dTransport != NULL );
 

Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp Sun Jun 17
17:07:33 2007
@@ -20,7 +20,7 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
 
 #include <activemq/concurrent/Thread.h>
-#include <activemq/transport/DummyTransportFactory.h>
+#include <activemq/transport/MockTransportFactory.h>
 #include <activemq/transport/TransportFactoryMap.h>
 #include <activemq/transport/TransportFactoryMapRegistrar.h>
 #include <activemq/connector/ConsumerInfo.h>
@@ -493,16 +493,13 @@
 {
     try
     {
-        transport::TransportFactoryMapRegistrar registrar(
-            "dummy", new transport::DummyTransportFactory() );
-
-        ActiveMQConnectionFactory factory("dummy://127.0.0.1:12345?wireFormat=stomp");
+        ActiveMQConnectionFactory factory("mock://127.0.0.1:12345?wireFormat=stomp");
 
         connection = dynamic_cast< ActiveMQConnection*>(
             factory.createConnection() );
 
         // Get the Transport and make sure we got a dummy Transport
-        dTransport = transport::DummyTransport::getInstance();
+        dTransport = transport::MockTransport::getInstance();
         CPPUNIT_ASSERT( dTransport != NULL );
 
         connection->setExceptionListener( &exListener );

Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h?view=diff&rev=548143&r1=548142&r2=548143
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h Sun Jun 17 17:07:33
2007
@@ -27,7 +27,7 @@
 #include <activemq/concurrent/Concurrent.h>
 #include <activemq/concurrent/Mutex.h>
 #include <activemq/core/ActiveMQConnection.h>
-#include <activemq/transport/DummyTransport.h>
+#include <activemq/transport/MockTransport.h>
 #include <activemq/util/Config.h>
 
 namespace activemq{
@@ -109,7 +109,7 @@
         };
 
         ActiveMQConnection* connection;
-        transport::DummyTransport* dTransport;
+        transport::MockTransport* dTransport;
         MyExceptionListener exListener;
 
     public:    // CPPUNIT Method Overrides.



Mime
View raw message