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 2007/06/18 19:06:47 UTC

svn commit: r548414 - /activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h

Author: tabish
Date: Mon Jun 18 10:06:43 2007
New Revision: 548414

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

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h

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=548414&r1=548413&r2=548414
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h Mon Jun 18 10:06:43 2007
@@ -32,10 +32,25 @@
 namespace activemq{
 namespace transport{
 
+    /**
+     * The MockTransport defines a base level Transport class that is intended to
+     * be used in place of an a regular protocol Transport suck as TCP.  This
+     * Transport assumes that it is the base Transport in the Transports stack, and
+     * destroys any Transports that are passed to it in its constructor.
+     *
+     * This Transport defines an Interface ResponseBuilder which must be implemented
+     * by any protocol for which the Transport is used to Emulate.  The Transport
+     * hands off all outbound commands to the ResponseBuilder for processing, it is
+     * up to the builder to create appropriate responses and schedule any asynchronous
+     * messages that might result from a message sent to the Broker.
+     */
     class MockTransport : public Transport{
-
     public:
 
+        /**
+         * Interface for all Protocols to implement that defines the behavior
+         * of the Broker in response to messages of that protocol.
+         */
         class ResponseBuilder{
         public:
             virtual ~ResponseBuilder(){}
@@ -44,6 +59,13 @@
             virtual Command* buildIncomingCommand( const Command* cmd ) = 0;
         };
 
+        /**
+         * Listens for Commands sent from the MockTransport.  This class
+         * processes all outbound commands and sends responses that are
+         * constructed by calling the Protocol provided ResponseBuilder
+         * and getting a set of Commands to send back into the MockTransport
+         * as imcoming Commands and Responses.
+         */
         class InternalCommandListener :
             public CommandListener,
             public concurrent::Thread