activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1397341 [3/4] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/activemq/core/ main/activemq/transport/ main/activemq/transport/correlator/ main/activemq/transport/failover/ main/activemq/transport/inactivity/ main/activemq/tr...
Date Thu, 11 Oct 2012 22:39:49 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp Thu Oct 11 22:39:46 2012
@@ -35,7 +35,7 @@ URIPool::URIPool() : uriPool(), randomiz
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-URIPool::URIPool( const decaf::util::List<URI>& uris ) : uriPool(), randomize( false ) {
+URIPool::URIPool(const decaf::util::List<URI>& uris) : uriPool(), randomize( false ) {
     this->uriPool.copy( uris );
 }
 
@@ -46,13 +46,12 @@ URIPool::~URIPool() {
 ////////////////////////////////////////////////////////////////////////////////
 URI URIPool::getURI() {
 
-    synchronized( &uriPool ) {
+    synchronized(&uriPool) {
         if( !uriPool.isEmpty() ) {
 
             int index = 0;  // Take the first one in the list unless random is on.
 
             if( isRandomize() ) {
-
                 Random rand;
                 rand.setSeed( decaf::lang::System::currentTimeMillis() );
                 index = rand.nextInt( (int)uriPool.size() );
@@ -67,38 +66,38 @@ URI URIPool::getURI() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void URIPool::addURI( const URI& uri ) {
+void URIPool::addURI(const URI& uri) {
 
-    synchronized( &uriPool ) {
-        if( !uriPool.contains( uri ) ) {
-            uriPool.add( uri );
+    synchronized(&uriPool) {
+        if (!uriPool.contains(uri)) {
+            uriPool.add(uri);
         }
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void URIPool::addURIs( const LinkedList<URI>& uris ) {
+void URIPool::addURIs(const LinkedList<URI>& uris) {
 
-    synchronized( &uriPool ) {
+    synchronized(&uriPool) {
 
-        std::auto_ptr< Iterator<URI> > iter( uris.iterator() );
+        std::auto_ptr<Iterator<URI> > iter(uris.iterator());
 
-        while( iter->hasNext() ) {
+        while (iter->hasNext()) {
             URI uri = iter->next();
 
-            if( !uriPool.contains( uri ) ) {
-                uriPool.add( uri );
+            if (!uriPool.contains(uri)) {
+                uriPool.add(uri);
             }
         }
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void URIPool::removeURI( const URI& uri ) {
+void URIPool::removeURI(const URI& uri) {
 
-    synchronized( &uriPool ) {
-        if( uriPool.contains( uri ) ) {
-            uriPool.remove( uri );
+    synchronized(&uriPool) {
+        if (uriPool.contains(uri)) {
+            uriPool.remove(uri);
         }
     }
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.h Thu Oct 11 22:39:46 2012
@@ -49,7 +49,7 @@ namespace failover {
          *
          * @param uris - List of URI to place in the Pool.
          */
-        URIPool( const decaf::util::List<URI>& uris );
+        URIPool(const decaf::util::List<URI>& uris);
 
         ~URIPool();
 
@@ -72,7 +72,7 @@ namespace failover {
          *
          * @param uri - a URI previously taken from the pool.
          */
-        void addURI( const URI& uri );
+        void addURI(const URI& uri);
 
         /**
          * Adds a List of URIs to this Pool, the method checks for duplicates already
@@ -80,13 +80,13 @@ namespace failover {
          *
          * @param uris - List of URIs to add into the Pool.
          */
-        void addURIs( const LinkedList<URI>& uris );
+        void addURIs(const LinkedList<URI>& uris);
 
         /**
          * Remove a given URI from the Free List.
          * @param uri - the URI to find and remove from the free list
          */
-        void removeURI( const URI& uri );
+        void removeURI(const URI& uri);
 
         /**
          * Is the URI that is given randomly picked from the pool or is
@@ -104,7 +104,7 @@ namespace failover {
          *
          * @param value - true indicates URI gets are random.
          */
-        void setRandomize( bool value ) {
+        void setRandomize(bool value) {
             this->randomize = value;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.cpp Thu Oct 11 22:39:46 2012
@@ -25,6 +25,9 @@
 #include <activemq/commands/WireFormatInfo.h>
 #include <activemq/commands/KeepAliveInfo.h>
 
+#include <decaf/util/Timer.h>
+#include <decaf/util/concurrent/atomic/AtomicBoolean.h>
+#include <decaf/util/concurrent/atomic/AtomicInteger.h>
 #include <decaf/lang/Math.h>
 #include <decaf/lang/Thread.h>
 #include <decaf/lang/Runnable.h>
@@ -202,7 +205,7 @@ namespace inactivity{
 }}}
 
 ////////////////////////////////////////////////////////////////////////////////
-InactivityMonitor::InactivityMonitor(const Pointer<Transport>& next, const Pointer<WireFormat>& wireFormat) :
+InactivityMonitor::InactivityMonitor(const Pointer<Transport> next, const Pointer<WireFormat> wireFormat) :
     TransportFilter(next), members(new InactivityMonitorData()) {
 
     this->members->wireFormat = wireFormat;
@@ -219,7 +222,7 @@ InactivityMonitor::InactivityMonitor(con
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-InactivityMonitor::InactivityMonitor(const Pointer<Transport>& next, const decaf::util::Properties& properties, const Pointer<wireformat::WireFormat>& wireFormat) :
+InactivityMonitor::InactivityMonitor(const Pointer<Transport> next, const decaf::util::Properties& properties, const Pointer<wireformat::WireFormat> wireFormat) :
     TransportFilter(next), members(new InactivityMonitorData()) {
 
     this->members->wireFormat = wireFormat;
@@ -309,7 +312,7 @@ void InactivityMonitor::onException(cons
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void InactivityMonitor::onCommand(const Pointer<Command>& command) {
+void InactivityMonitor::onCommand(const Pointer<Command> command) {
 
     this->members->commandReceived.set(true);
     this->members->inRead.set(true);
@@ -340,7 +343,7 @@ void InactivityMonitor::onCommand(const 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void InactivityMonitor::oneway(const Pointer<Command>& command) {
+void InactivityMonitor::oneway(const Pointer<Command> command) {
 
     try {
         // Disable inactivity monitoring while processing a command. Synchronize this
@@ -395,7 +398,6 @@ void InactivityMonitor::readCheck() {
     }
 
     if (!this->members->commandReceived.get()) {
-
         // Set the failed state on our async Read Failure Task and wakeup its runner.
         this->members->asyncReadTask->setFailed(true);
         this->members->asyncTasks->wakeup();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/InactivityMonitor.h Thu Oct 11 22:39:46 2012
@@ -22,14 +22,10 @@
 
 #include <activemq/transport/TransportFilter.h>
 #include <activemq/commands/Command.h>
-#include <activemq/commands/Response.h>
-#include <activemq/commands/WireFormatInfo.h>
 #include <activemq/wireformat/WireFormat.h>
 
 #include <decaf/lang/Pointer.h>
-#include <decaf/util/Timer.h>
 #include <decaf/util/Properties.h>
-#include <decaf/util/concurrent/atomic/AtomicBoolean.h>
 
 namespace activemq {
 namespace transport {
@@ -56,52 +52,52 @@ namespace inactivity {
 
     private:
 
-        InactivityMonitor( const InactivityMonitor& );
-        InactivityMonitor operator= ( const InactivityMonitor& );
+        InactivityMonitor(const InactivityMonitor&);
+        InactivityMonitor operator=(const InactivityMonitor&);
 
     public:
 
-        InactivityMonitor( const Pointer<Transport>& next,
-                           const Pointer<wireformat::WireFormat>& wireFormat );
+        InactivityMonitor(const Pointer<Transport> next,
+                          const Pointer<wireformat::WireFormat> wireFormat);
 
-        InactivityMonitor( const Pointer<Transport>& next,
-                           const decaf::util::Properties& properties,
-                           const Pointer<wireformat::WireFormat>& wireFormat );
+        InactivityMonitor(const Pointer<Transport> next,
+                          const decaf::util::Properties& properties,
+                          const Pointer<wireformat::WireFormat> wireFormat);
 
         virtual ~InactivityMonitor();
 
-    public:  // TransportFilter Methods
+    public: // TransportFilter Methods
 
         virtual void close();
 
-        virtual void onException( const decaf::lang::Exception& ex );
+        virtual void onException(const decaf::lang::Exception& ex);
 
-        virtual void onCommand( const Pointer<Command>& command );
+        virtual void onCommand(const Pointer<Command> command);
 
-        virtual void oneway( const Pointer<Command>& command );
+        virtual void oneway(const Pointer<Command> command);
 
     public:
 
         bool isKeepAliveResponseRequired() const;
 
-        void setKeepAliveResponseRequired( bool value );
+        void setKeepAliveResponseRequired(bool value);
 
         long long getReadCheckTime() const;
 
-        void setReadCheckTime( long long value );
+        void setReadCheckTime(long long value);
 
         long long getWriteCheckTime() const;
 
-        void setWriteCheckTime( long long value );
+        void setWriteCheckTime(long long value);
 
         long long getInitialDelayTime() const;
 
-        void setInitialDelayTime( long long value ) const;
+        void setInitialDelayTime(long long value) const;
 
     private:
 
         // Throttles read checking
-        bool allowReadCheck( long long elapsed );
+        bool allowReadCheck(long long elapsed);
 
         // Performs a Read Check on the current connection, called from a separate Thread.
         void readCheck();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.cpp Thu Oct 11 22:39:46 2012
@@ -31,11 +31,10 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-ReadChecker::ReadChecker( InactivityMonitor* parent ) : TimerTask(), parent( parent ), lastRunTime( 0 ) {
+ReadChecker::ReadChecker(InactivityMonitor* parent) : TimerTask(), parent(parent), lastRunTime(0) {
 
-    if( this->parent == NULL ) {
-        throw NullPointerException(
-            __FILE__, __LINE__, "ReadChecker created with NULL parent." );
+    if (this->parent == NULL) {
+        throw NullPointerException(__FILE__, __LINE__, "ReadChecker created with NULL parent.");
     }
 }
 
@@ -47,14 +46,14 @@ ReadChecker::~ReadChecker() {
 void ReadChecker::run() {
 
     long long now = System::currentTimeMillis();
-    long long elapsed = ( now - this->lastRunTime );
+    long long elapsed = (now - this->lastRunTime);
 
     // Perhaps the timer executed a read check late.. and then executes
     // the next read check on time which causes the time elapsed between
     // read checks to be small..
 
     // If less than 90% of the read check Time elapsed then abort this readcheck.
-    if( !this->parent->allowReadCheck( elapsed ) ) {
+    if (!this->parent->allowReadCheck(elapsed)) {
         return;
     }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/ReadChecker.h Thu Oct 11 22:39:46 2012
@@ -37,8 +37,8 @@ namespace inactivity {
     class AMQCPP_API ReadChecker : public decaf::util::TimerTask {
     private:
 
-        ReadChecker( const ReadChecker& );
-        ReadChecker operator= ( const ReadChecker& );
+        ReadChecker(const ReadChecker&);
+        ReadChecker operator=(const ReadChecker&);
 
     private:
 
@@ -50,7 +50,7 @@ namespace inactivity {
 
     public:
 
-        ReadChecker( InactivityMonitor* parent );
+        ReadChecker(InactivityMonitor* parent);
         virtual ~ReadChecker();
 
         virtual void run();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.cpp Thu Oct 11 22:39:46 2012
@@ -31,17 +31,15 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-WriteChecker::WriteChecker( InactivityMonitor* parent ) : TimerTask(), parent( parent ), lastRunTime( 0 ) {
+WriteChecker::WriteChecker(InactivityMonitor* parent) : TimerTask(), parent(parent), lastRunTime(0) {
 
-    if( this->parent == NULL ) {
-        throw NullPointerException(
-            __FILE__, __LINE__, "WriteChecker created with NULL parent." );
+    if (this->parent == NULL) {
+        throw NullPointerException(__FILE__, __LINE__, "WriteChecker created with NULL parent.");
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-WriteChecker::~WriteChecker() {
-}
+WriteChecker::~WriteChecker() {}
 
 ////////////////////////////////////////////////////////////////////////////////
 void WriteChecker::run() {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity/WriteChecker.h Thu Oct 11 22:39:46 2012
@@ -38,8 +38,8 @@ namespace inactivity {
     class AMQCPP_API WriteChecker : public decaf::util::TimerTask {
     private:
 
-        WriteChecker( const WriteChecker& );
-        WriteChecker operator= ( const WriteChecker& );
+        WriteChecker(const WriteChecker&);
+        WriteChecker operator=(const WriteChecker&);
 
     private:
 
@@ -51,7 +51,7 @@ namespace inactivity {
 
     public:
 
-        WriteChecker( InactivityMonitor* parent );
+        WriteChecker(InactivityMonitor* parent);
         virtual ~WriteChecker();
 
         virtual void run();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.cpp Thu Oct 11 22:39:46 2012
@@ -27,67 +27,66 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-LoggingTransport::LoggingTransport( const Pointer<Transport>& next )
- :  TransportFilter( next )
-{}
+LoggingTransport::LoggingTransport(const Pointer<Transport> next) : TransportFilter(next) {
+}
 
 ////////////////////////////////////////////////////////////////////////////////
-void LoggingTransport::onCommand( const Pointer<Command>& command ) {
+void LoggingTransport::onCommand(const Pointer<Command> command) {
 
     std::cout << "RECV: " << command->toString() << std::endl;
 
     // Delegate to the base class.
-    TransportFilter::onCommand( command );
+    TransportFilter::onCommand(command);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void LoggingTransport::oneway( const Pointer<Command>& command ) {
+void LoggingTransport::oneway(const Pointer<Command> command) {
 
     try {
 
         std::cout << "SEND: " << command->toString() << std::endl;
 
         // Delegate to the base class.
-        TransportFilter::oneway( command );
+        TransportFilter::oneway(command);
     }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Response> LoggingTransport::request( const Pointer<Command>& command ) {
+Pointer<Response> LoggingTransport::request(const Pointer<Command> command) {
 
     try {
 
         std::cout << "SEND: " << command->toString() << std::endl;
 
         // Delegate to the base class.
-        Pointer<Response> response = TransportFilter::request( command );
+        Pointer<Response> response = TransportFilter::request(command);
 
         return response;
     }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Response> LoggingTransport::request( const Pointer<Command>& command, unsigned int timeout ) {
+Pointer<Response> LoggingTransport::request(const Pointer<Command> command, unsigned int timeout) {
 
     try {
 
         std::cout << "SEND: " << command->toString() << std::endl;
 
         // Delegate to the base class.
-        Pointer<Response> response = TransportFilter::request( command, timeout );
+        Pointer<Response> response = TransportFilter::request(command, timeout);
 
         return response;
     }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/logging/LoggingTransport.h Thu Oct 11 22:39:46 2012
@@ -31,38 +31,38 @@ namespace logging{
     /**
      * A transport filter that logs commands as they are sent/received.
      */
-    class AMQCPP_API LoggingTransport : public TransportFilter {
+    class AMQCPP_API LoggingTransport: public TransportFilter {
     public:
 
         /**
          * Constructor.
          * @param next - the next Transport in the chain
          */
-        LoggingTransport( const Pointer<Transport>& next );
+        LoggingTransport(const Pointer<Transport> next);
 
         virtual ~LoggingTransport() {}
 
-    public:  // TransportFilter methods.
+    public: // TransportFilter methods.
 
-        virtual void onCommand( const Pointer<Command>& command );
+        virtual void onCommand(const Pointer<Command> command);
 
-    public:  // TransportFilter methods.
+    public: // TransportFilter methods.
 
-        virtual void oneway( const Pointer<Command>& command );
+        virtual void oneway(const Pointer<Command> command);
 
         /**
          * {@inheritDoc}
          *
          * Not supported by this class - throws an exception.
          */
-        virtual Pointer<Response> request( const Pointer<Command>& command );
+        virtual Pointer<Response> request(const Pointer<Command> command);
 
         /**
          * {@inheritDoc}
          *
          * Not supported by this class - throws an exception.
          */
-        virtual Pointer<Response> request( const Pointer<Command>& command, unsigned int timeout );
+        virtual Pointer<Response> request(const Pointer<Command> command, unsigned int timeout);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.cpp Thu Oct 11 22:39:46 2012
@@ -48,11 +48,11 @@ InternalCommandListener::~InternalComman
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void InternalCommandListener::onCommand( const Pointer<Command>& command ) {
+void InternalCommandListener::onCommand(const Pointer<Command> command) {
     synchronized( &inboundQueue ) {
         // Create a response now before the caller has a
         // chance to destroy the command.
-        responseBuilder->buildIncomingCommands( command, inboundQueue );
+        responseBuilder->buildIncomingCommands(command, inboundQueue);
 
         // Wake up the thread, messages are dispatched from there.
         inboundQueue.notifyAll();
@@ -64,34 +64,34 @@ void InternalCommandListener::run() {
 
     try {
 
-        synchronized( &inboundQueue ) {
+        synchronized(&inboundQueue) {
 
-            while( !done ) {
+            while (!done) {
                 startedLatch.countDown();
 
-                while( inboundQueue.isEmpty() && !done ){
+                while (inboundQueue.isEmpty() && !done) {
                     inboundQueue.wait();
                 }
 
-                if( done || transport == NULL ) {
+                if (done || transport == NULL) {
                     continue;
                 }
 
                 // If we created a response then send it.
-                while( !inboundQueue.isEmpty() ) {
+                while (!inboundQueue.isEmpty()) {
 
                     Pointer<Command> command = inboundQueue.pop();
 
-                    if( command->isMessage() && transport->isFailOnReceiveMessage() ) {
-                        transport->setNumReceivedMessages( transport->getNumReceivedMessages() + 1 );
+                    if (command->isMessage() && transport->isFailOnReceiveMessage()) {
+                        transport->setNumReceivedMessages(transport->getNumReceivedMessages() + 1);
 
-                        if( transport->getNumReceivedMessages() > transport->getNumReceivedMessageBeforeFail() ) {
-                            transport->fireException(
-                                IOException( __FILE__, __LINE__, "Failed to Send Message.") );;
+                        if (transport->getNumReceivedMessages() > transport->getNumReceivedMessageBeforeFail()) {
+                            transport->fireException(IOException(__FILE__, __LINE__, "Failed to Send Message."));
+                            ;
                         }
                     }
 
-                    transport->fireCommand( command );
+                    transport->fireCommand(command);
                 }
             }
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/InternalCommandListener.h Thu Oct 11 22:39:46 2012
@@ -50,12 +50,12 @@ namespace mock {
         Pointer<ResponseBuilder> responseBuilder;
         bool done;
         decaf::util::concurrent::CountDownLatch startedLatch;
-        decaf::util::LinkedList< Pointer<Command> > inboundQueue;
+        decaf::util::LinkedList<Pointer<Command> > inboundQueue;
 
     private:
 
-        InternalCommandListener( const InternalCommandListener& );
-        InternalCommandListener operator= ( const InternalCommandListener& );
+        InternalCommandListener(const InternalCommandListener&);
+        InternalCommandListener operator=(const InternalCommandListener&);
 
     public:
 
@@ -63,15 +63,15 @@ namespace mock {
 
         virtual ~InternalCommandListener();
 
-        void setTransport( MockTransport* transport ) {
+        void setTransport(MockTransport* transport) {
             this->transport = transport;
         }
 
-        void setResponseBuilder( const Pointer<ResponseBuilder>& responseBuilder ) {
+        void setResponseBuilder(const Pointer<ResponseBuilder> responseBuilder) {
             this->responseBuilder = responseBuilder;
         }
 
-        virtual void onCommand( const Pointer<Command>& command );
+        virtual void onCommand(const Pointer<Command> command);
 
         void run();
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.cpp Thu Oct 11 22:39:46 2012
@@ -31,8 +31,8 @@ using namespace decaf::lang::exceptions;
 MockTransport* MockTransport::instance = NULL;
 
 ////////////////////////////////////////////////////////////////////////////////
-MockTransport::MockTransport( const Pointer<WireFormat>& wireFormat,
-                              const Pointer<ResponseBuilder>& responseBuilder ) :
+MockTransport::MockTransport(const Pointer<WireFormat> wireFormat,
+                             const Pointer<ResponseBuilder> responseBuilder) :
     responseBuilder(responseBuilder),
     wireFormat(wireFormat),
     outgoingListener(),
@@ -61,114 +61,150 @@ MockTransport::MockTransport( const Poin
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void MockTransport::oneway( const Pointer<Command>& command ) {
+void MockTransport::oneway(const Pointer<Command> command) {
 
-    try{
+    try {
 
-        if( command->isMessage() && this->failOnSendMessage ) {
+        if (command->isMessage() && this->failOnSendMessage) {
             this->numSentMessages++;
 
-            if( this->numSentMessages > this->numSentMessageBeforeFail ) {
-                throw IOException(
-                    __FILE__, __LINE__, "Failed to Send Message.");
+            if (this->numSentMessages > this->numSentMessageBeforeFail) {
+                throw IOException(__FILE__, __LINE__, "Failed to Send Message.");
             }
         }
 
-        if( command->isKeepAliveInfo() && this->failOnKeepAliveSends ) {
+        if (command->isKeepAliveInfo() && this->failOnKeepAliveSends) {
             this->numSentKeepAlives++;
 
-            if( this->numSentKeepAlives > this->numSentKeepAlivesBeforeFail ) {
-                throw IOException(
-                    __FILE__, __LINE__, "Failed to Send KeepAliveInfo Command.");
+            if (this->numSentKeepAlives > this->numSentKeepAlivesBeforeFail) {
+                throw IOException(__FILE__, __LINE__, "Failed to Send KeepAliveInfo Command.");
             }
         }
 
         // Process and send any new Commands back.
-        internalListener.onCommand( command );
+        internalListener.onCommand(command);
 
         // Notify external Client of command that we "sent"
-        if( outgoingListener != NULL ){
-            outgoingListener->onCommand( command );
+        if (outgoingListener != NULL) {
+            outgoingListener->onCommand(command);
             return;
         }
     }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+    AMQ_CATCH_RETHROW( IOException)
+    AMQ_CATCH_RETHROW( UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
+    AMQ_CATCHALL_THROW( IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Response> MockTransport::request( const Pointer<Command>& command ) {
+Pointer<FutureResponse> MockTransport::asyncRequest(const Pointer<Command> command,
+                                                    const Pointer<ResponseCallback> responseCallback) {
 
-    try{
 
-        if( responseBuilder != NULL ){
+    try {
 
-            if( command->isMessage() && this->failOnSendMessage ) {
+        if (responseBuilder != NULL) {
+
+            if (command->isMessage() && this->failOnSendMessage) {
                 this->numSentMessages++;
 
-                if( this->numSentMessages > this->numSentMessageBeforeFail ) {
-                    throw IOException(
-                        __FILE__, __LINE__, "Failed to Send Message.");
+                if (this->numSentMessages > this->numSentMessageBeforeFail) {
+                    throw IOException(__FILE__, __LINE__, "Failed to Send Message.");
                 }
             }
 
             // Notify external Client of command that we "sent"
-            if( outgoingListener != NULL ){
-                outgoingListener->onCommand( command );
+            if (outgoingListener != NULL) {
+                outgoingListener->onCommand(command);
             }
 
-            command->setCommandId( this->nextCommandId.incrementAndGet() );
-            command->setResponseRequired( true );
-            return responseBuilder->buildResponse( command );
+            command->setCommandId(this->nextCommandId.incrementAndGet());
+            command->setResponseRequired(true);
+
+            Pointer<FutureResponse> future(new FutureResponse(responseCallback));
+            Pointer<Response> response(responseBuilder->buildResponse(command));
+
+            future->setResponse(response);
+
+            return future;
         }
 
-        throw IOException(
-            __FILE__, __LINE__,
-            "MockTransport::request - no response builder available" );
-    }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+        throw IOException(__FILE__, __LINE__, "MockTransport::request - no response builder available");
+    }
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(ActiveMQException, IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Response> MockTransport::request( const Pointer<Command>& command,
-                                          unsigned int timeout AMQCPP_UNUSED ) {
-    try{
-        return this->request( command );
-    }
-    AMQ_CATCH_RETHROW( IOException )
-    AMQ_CATCH_RETHROW( UnsupportedOperationException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    AMQ_CATCHALL_THROW( IOException )
+Pointer<Response> MockTransport::request(const Pointer<Command> command) {
+
+    try {
+
+        if (responseBuilder != NULL) {
+
+            if (command->isMessage() && this->failOnSendMessage) {
+                this->numSentMessages++;
+
+                if (this->numSentMessages > this->numSentMessageBeforeFail) {
+                    throw IOException(__FILE__, __LINE__, "Failed to Send Message.");
+                }
+            }
+
+            // Notify external Client of command that we "sent"
+            if (outgoingListener != NULL) {
+                outgoingListener->onCommand(command);
+            }
+
+            command->setCommandId(this->nextCommandId.incrementAndGet());
+            command->setResponseRequired(true);
+            return responseBuilder->buildResponse(command);
+        }
+
+        throw IOException(__FILE__, __LINE__, "MockTransport::request - no response builder available");
+    }
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(ActiveMQException, IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
+}
+
+////////////////////////////////////////////////////////////////////////////////
+Pointer<Response> MockTransport::request(const Pointer<Command> command, unsigned int timeout AMQCPP_UNUSED) {
+    try {
+        return this->request(command);
+    }
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_RETHROW(UnsupportedOperationException)
+    AMQ_CATCH_EXCEPTION_CONVERT(ActiveMQException, IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void MockTransport::start() {
 
-    if( this->failOnStart ) {
-        throw IOException( __FILE__, __LINE__, "Failed to Start MockTransport." );
+    if (this->failOnStart) {
+        throw IOException(__FILE__, __LINE__, "Failed to Start MockTransport.");
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void MockTransport::stop() {
 
-    if( this->failOnStop ) {
-        throw IOException( __FILE__, __LINE__, "Failed to Stop MockTransport." );
+    if (this->failOnStop) {
+        throw IOException(__FILE__, __LINE__, "Failed to Stop MockTransport.");
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void MockTransport::close() {
 
-    if( this->failOnClose ) {
-        throw IOException( __FILE__, __LINE__, "Failed to Close MockTransport." );
+    if (this->failOnClose) {
+        throw IOException(__FILE__, __LINE__, "Failed to Close MockTransport.");
     }
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransport.h Thu Oct 11 22:39:46 2012
@@ -58,7 +58,7 @@ namespace mock{
      * up to the builder to create appropriate responses and schedule any asynchronous
      * messages that might result from a message sent to the Broker.
      */
-    class AMQCPP_API MockTransport : public Transport {
+    class AMQCPP_API MockTransport: public Transport {
     private:
 
         Pointer<ResponseBuilder> responseBuilder;
@@ -87,13 +87,12 @@ namespace mock{
 
     private:
 
-        MockTransport( const MockTransport& );
-        MockTransport operator= ( const MockTransport& );
+        MockTransport(const MockTransport&);
+        MockTransport operator=(const MockTransport&);
 
     public:
 
-        MockTransport( const Pointer<wireformat::WireFormat>& wireFormat,
-                       const Pointer<ResponseBuilder>& responseBuilder );
+        MockTransport(const Pointer<wireformat::WireFormat> wireFormat, const Pointer<ResponseBuilder> responseBuilder);
 
         virtual ~MockTransport() {}
 
@@ -106,9 +105,9 @@ namespace mock{
          * CommandListener if there is one.
          * @param command - Command to send to the Listener.
          */
-        virtual void fireCommand( const Pointer<Command>& command ){
-            if( listener != NULL ){
-                listener->onCommand( command );
+        virtual void fireCommand(const Pointer<Command> command) {
+            if (listener != NULL) {
+                listener->onCommand(command);
             }
         }
 
@@ -119,9 +118,9 @@ namespace mock{
          * @param ex
          *      The Exception that will be passed on the the Transport listener.
          */
-        virtual void fireException( const exceptions::ActiveMQException& ex ){
-            if( listener != NULL ){
-                listener->onException( ex );
+        virtual void fireException(const exceptions::ActiveMQException& ex) {
+            if (listener != NULL) {
+                listener->onException(ex);
             }
         }
 
@@ -131,18 +130,17 @@ namespace mock{
          * would have been sent Asynchronously be the Broker.
          * @param responseBuilder - The ResponseBuilder to use from now on.
          */
-        void setResponseBuilder( const Pointer<ResponseBuilder>& responseBuilder ){
+        void setResponseBuilder(const Pointer<ResponseBuilder> responseBuilder) {
             this->responseBuilder = responseBuilder;
         }
 
-
         /**
          * Sets a Listener that gets notified for every command that would
          * have been sent by this transport to the Broker, this allows a client
          * to verify that its messages are making it to the wire.
          * @param listener - The CommandListener to notify for each message
          */
-        virtual void setOutgoingListener( TransportListener* listener ){
+        virtual void setOutgoingListener(TransportListener* listener) {
             outgoingListener = listener;
         }
 
@@ -155,17 +153,20 @@ namespace mock{
             return this->wireFormat;
         }
 
-    public:  // Transport Methods
+    public: // Transport Methods
+
+        virtual void oneway(const Pointer<Command> command);
 
-        virtual void oneway( const Pointer<Command>& command );
+        virtual Pointer<FutureResponse> asyncRequest(const Pointer<Command> command,
+                                                     const Pointer<ResponseCallback> responseCallback);
 
-        virtual Pointer<Response> request( const Pointer<Command>& command );
+        virtual Pointer<Response> request(const Pointer<Command> command);
 
-        virtual Pointer<Response> request( const Pointer<Command>& command, unsigned int timeout );
+        virtual Pointer<Response> request(const Pointer<Command> command, unsigned int timeout);
 
-        virtual void setWireFormat( const Pointer<wireformat::WireFormat>& wireFormat AMQCPP_UNUSED ) {}
+        virtual void setWireFormat(const Pointer<wireformat::WireFormat> wireFormat AMQCPP_UNUSED) {}
 
-        virtual void setTransportListener( TransportListener* listener ){
+        virtual void setTransportListener(TransportListener* listener) {
             this->listener = listener;
         }
 
@@ -179,8 +180,8 @@ namespace mock{
 
         virtual void close();
 
-        virtual Transport* narrow( const std::type_info& typeId ) {
-            if( typeid( *this ) == typeId ) {
+        virtual Transport* narrow(const std::type_info& typeId) {
+            if (typeid( *this ) == typeId) {
                 return this;
             }
 
@@ -203,15 +204,15 @@ namespace mock{
             return "";
         }
 
-        virtual void reconnect( const decaf::net::URI& uri AMQCPP_UNUSED ) {}
+        virtual void reconnect(const decaf::net::URI& uri AMQCPP_UNUSED) {}
 
-    public:  // Property Getters and Setters
+    public: // Property Getters and Setters
 
         std::string getName() const {
             return this->name;
         }
 
-        void setName( const std::string& name ) {
+        void setName(const std::string& name) {
             this->name = name;
         }
 
@@ -219,7 +220,7 @@ namespace mock{
             return this->failOnSendMessage;
         }
 
-        void setFailOnSendMessage( bool value ) {
+        void setFailOnSendMessage(bool value) {
             this->failOnSendMessage = value;
         }
 
@@ -227,7 +228,7 @@ namespace mock{
             return this->numSentMessageBeforeFail;
         }
 
-        void setNumSentMessageBeforeFail( int value ) {
+        void setNumSentMessageBeforeFail(int value) {
             this->numSentMessageBeforeFail = value;
         }
 
@@ -235,7 +236,7 @@ namespace mock{
             return this->numSentMessages;
         }
 
-        void setNumSentMessages( int value ) {
+        void setNumSentMessages(int value) {
             this->numSentMessages = value;
         }
 
@@ -243,7 +244,7 @@ namespace mock{
             return this->failOnReceiveMessage;
         }
 
-        void setFailOnReceiveMessage( bool value ) {
+        void setFailOnReceiveMessage(bool value) {
             this->failOnReceiveMessage = value;
         }
 
@@ -251,7 +252,7 @@ namespace mock{
             return this->numReceivedMessageBeforeFail;
         }
 
-        void setNumReceivedMessageBeforeFail( int value ) {
+        void setNumReceivedMessageBeforeFail(int value) {
             this->numReceivedMessageBeforeFail = value;
         }
 
@@ -259,7 +260,7 @@ namespace mock{
             return this->numReceivedMessages;
         }
 
-        void setNumReceivedMessages( int value ) {
+        void setNumReceivedMessages(int value) {
             this->numReceivedMessages = value;
         }
 
@@ -267,7 +268,7 @@ namespace mock{
             return this->failOnKeepAliveSends;
         }
 
-        void setFailOnKeepAliveSends( bool value ) {
+        void setFailOnKeepAliveSends(bool value) {
             this->failOnKeepAliveSends = value;
         }
 
@@ -275,7 +276,7 @@ namespace mock{
             return this->numSentKeepAlivesBeforeFail;
         }
 
-        void setNumSentKeepAlivesBeforeFail( int value ) {
+        void setNumSentKeepAlivesBeforeFail(int value) {
             this->numSentKeepAlivesBeforeFail = value;
         }
 
@@ -283,7 +284,7 @@ namespace mock{
             return this->numSentKeepAlives;
         }
 
-        void setNumSentKeepAlives( int value ) {
+        void setNumSentKeepAlives(int value) {
             this->numSentKeepAlives = value;
         }
 
@@ -291,7 +292,7 @@ namespace mock{
             return this->failOnReceiveMessage;
         }
 
-        void setFailOnStart( bool value ) {
+        void setFailOnStart(bool value) {
             this->failOnReceiveMessage = value;
         }
 
@@ -299,7 +300,7 @@ namespace mock{
             return this->failOnStop;
         }
 
-        void setFailOnStop( bool value ) {
+        void setFailOnStop(bool value) {
             this->failOnStop = value;
         }
 
@@ -307,7 +308,7 @@ namespace mock{
             return this->failOnClose;
         }
 
-        void setFailOnClose( bool value ) {
+        void setFailOnClose(bool value) {
             this->failOnClose = value;
         }
 
@@ -319,8 +320,7 @@ namespace mock{
             return false;
         }
 
-        virtual void updateURIs( bool rebalance AMQCPP_UNUSED,
-                                 const decaf::util::List<decaf::net::URI>& uris AMQCPP_UNUSED ) {
+        virtual void updateURIs(bool rebalance AMQCPP_UNUSED, const decaf::util::List<decaf::net::URI>& uris AMQCPP_UNUSED) {
             throw decaf::io::IOException();
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.cpp Thu Oct 11 22:39:46 2012
@@ -42,97 +42,91 @@ using namespace decaf::io;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> MockTransportFactory::create( const decaf::net::URI& location ) {
+Pointer<Transport> MockTransportFactory::create(const decaf::net::URI& location) {
 
-    try{
+    try {
 
-        Properties properties =
-            activemq::util::URISupport::parseQuery( location.getQuery() );
+        Properties properties = activemq::util::URISupport::parseQuery(location.getQuery());
 
-        Pointer<WireFormat> wireFormat = this->createWireFormat( properties );
+        Pointer<WireFormat> wireFormat = this->createWireFormat(properties);
 
         // Create the initial Transport, then wrap it in the normal Filters
-        Pointer<Transport> transport( doCreateComposite( location, wireFormat, properties ) );
+        Pointer<Transport> transport(doCreateComposite(location, wireFormat, properties));
 
         // Create the Transport for response correlator
-        transport.reset( new ResponseCorrelator( transport ) );
+        transport.reset(new ResponseCorrelator(transport));
 
         // If command tracing was enabled, wrap the transport with a logging transport.
-        if( properties.getProperty( "transport.commandTracingEnabled", "false" ) == "true" ) {
+        if (properties.getProperty("transport.commandTracingEnabled", "false") == "true") {
             // Create the Transport for response correlator
-            transport.reset( new LoggingTransport( transport ) );
+            transport.reset(new LoggingTransport(transport));
         }
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> MockTransportFactory::createComposite( const decaf::net::URI& location ) {
+Pointer<Transport> MockTransportFactory::createComposite(const decaf::net::URI& location) {
 
-    try{
+    try {
 
-        Properties properties =
-            activemq::util::URISupport::parseQuery( location.getQuery() );
+        Properties properties = activemq::util::URISupport::parseQuery(location.getQuery());
 
-        Pointer<WireFormat> wireFormat = this->createWireFormat( properties );
+        Pointer<WireFormat> wireFormat = this->createWireFormat(properties);
 
         // Create the initial Transport, then wrap it in the normal Filters
-        return doCreateComposite( location, wireFormat, properties );
+        return doCreateComposite(location, wireFormat, properties);
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> MockTransportFactory::doCreateComposite(
-    const decaf::net::URI& location AMQCPP_UNUSED,
-    const Pointer<wireformat::WireFormat>& wireFormat,
-    const decaf::util::Properties& properties ) {
+Pointer<Transport> MockTransportFactory::doCreateComposite(const decaf::net::URI& location AMQCPP_UNUSED,
+                                                           const Pointer<wireformat::WireFormat> wireFormat,
+                                                           const decaf::util::Properties& properties) {
 
     try {
 
-        std::string wireFormatName =
-            properties.getProperty( "wireFormat", "openwire" );
+        std::string wireFormatName = properties.getProperty("wireFormat", "openwire");
 
-        if( properties.getProperty( "failOnCreate", "false" ) == "true" ) {
-            throw IOException(
-                __FILE__, __LINE__, "Failed to Create MockTransport." );
+        if (properties.getProperty("failOnCreate", "false") == "true") {
+            throw IOException(__FILE__, __LINE__, "Failed to Create MockTransport.");
         }
 
         Pointer<ResponseBuilder> builder;
 
-        if( wireFormatName == "openwire" || wireFormatName == "stomp" ) {
-            builder.reset( new wireformat::openwire::OpenWireResponseBuilder() );
+        if (wireFormatName == "openwire" || wireFormatName == "stomp") {
+            builder.reset(new wireformat::openwire::OpenWireResponseBuilder());
         } else {
-            throw ActiveMQException(
-                __FILE__, __LINE__,
-                "No Response Builder known for this Wireformat, can't create a Mock." );
+            throw ActiveMQException(__FILE__, __LINE__,
+                "No Response Builder known for this Wireformat, can't create a Mock.");
         }
 
-        Pointer<MockTransport> transport( new MockTransport( wireFormat, builder ) );
+        Pointer<MockTransport> transport(new MockTransport(wireFormat, builder));
 
         transport->setFailOnSendMessage(
-            Boolean::parseBoolean( properties.getProperty( "failOnSendMessage", "false" ) ) );
+            Boolean::parseBoolean(properties.getProperty("failOnSendMessage", "false")));
         transport->setNumSentMessageBeforeFail(
-            Integer::parseInt( properties.getProperty( "numSentMessageBeforeFail", "0" ) ) );
+            Integer::parseInt(properties.getProperty("numSentMessageBeforeFail", "0")));
         transport->setFailOnReceiveMessage(
-            Boolean::parseBoolean( properties.getProperty( "failOnReceiveMessage", "false" ) ) );
+            Boolean::parseBoolean(properties.getProperty("failOnReceiveMessage", "false")));
         transport->setNumReceivedMessageBeforeFail(
-            Integer::parseInt( properties.getProperty( "numReceivedMessageBeforeFail", "0" ) ) );
+            Integer::parseInt(properties.getProperty("numReceivedMessageBeforeFail", "0")));
         transport->setFailOnKeepAliveSends(
-            Boolean::parseBoolean( properties.getProperty( "failOnKeepAliveSends", "false" ) ) );
+            Boolean::parseBoolean(properties.getProperty("failOnKeepAliveSends", "false")));
         transport->setNumSentKeepAlivesBeforeFail(
-            Integer::parseInt( properties.getProperty( "numSentKeepAlivesBeforeFail", "0" ) ) );
-        transport->setName( properties.getProperty( "name", "" ) );
+            Integer::parseInt(properties.getProperty("numSentKeepAlivesBeforeFail", "0")));
+        transport->setName(properties.getProperty("name", ""));
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/MockTransportFactory.h Thu Oct 11 22:39:46 2012
@@ -21,9 +21,9 @@
 #include <activemq/util/Config.h>
 #include <activemq/transport/AbstractTransportFactory.h>
 
-namespace activemq{
-namespace transport{
-namespace mock{
+namespace activemq {
+namespace transport {
+namespace mock {
 
     using decaf::lang::Pointer;
 
@@ -31,7 +31,7 @@ namespace mock{
      * Manufactures MockTransports, which are objects that
      * read from input streams and write to output streams.
      */
-    class AMQCPP_API MockTransportFactory : public AbstractTransportFactory {
+    class AMQCPP_API MockTransportFactory: public AbstractTransportFactory {
     public:
 
         virtual ~MockTransportFactory() {}
@@ -42,7 +42,7 @@ namespace mock{
          * @param location - URI location to connect to plus any properties to assign.
          * @throws ActiveMQexception if an error occurs
          */
-        virtual Pointer<Transport> create( const decaf::net::URI& location );
+        virtual Pointer<Transport> create(const decaf::net::URI& location);
 
         /**
          * Creates a slimed down Transport instance which can be used in composite
@@ -50,7 +50,7 @@ namespace mock{
          * @param location - URI location to connect to plus any properties to assign.
          * @throws ActiveMQexception if an error occurs
          */
-        virtual Pointer<Transport> createComposite( const decaf::net::URI& location );
+        virtual Pointer<Transport> createComposite(const decaf::net::URI& location);
 
     protected:
 
@@ -65,9 +65,9 @@ namespace mock{
          * @return Pointer to a new Transport instance.
          * @throws ActiveMQexception if an error occurs
          */
-        virtual Pointer<Transport> doCreateComposite( const decaf::net::URI& location,
-                                                      const Pointer<wireformat::WireFormat>& wireFormat,
-                                                      const decaf::util::Properties& properties );
+        virtual Pointer<Transport> doCreateComposite(const decaf::net::URI& location,
+                                                     const Pointer<wireformat::WireFormat> wireFormat,
+                                                     const decaf::util::Properties& properties);
 
     };
 

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.cpp?rev=1397341&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.cpp Thu Oct 11 22:39:46 2012
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ResponseBuilder.h"
+
+using namespace activemq;
+using namespace activemq::transport;
+using namespace activemq::transport::mock;
+
+////////////////////////////////////////////////////////////////////////////////
+ResponseBuilder::~ResponseBuilder() {
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/mock/ResponseBuilder.h Thu Oct 11 22:39:46 2012
@@ -41,7 +41,7 @@ namespace mock {
     class AMQCPP_API ResponseBuilder {
     public:
 
-        virtual ~ResponseBuilder() {}
+        virtual ~ResponseBuilder();
 
         /**
          * Given a Command, check if it requires a response and return the
@@ -49,7 +49,7 @@ namespace mock {
          * @param command - The command to build a response for
          * @return A Response object pointer, or NULL if no response.
          */
-        virtual Pointer<Response> buildResponse( const Pointer<Command>& command ) = 0;
+        virtual Pointer<Response> buildResponse(const Pointer<Command> command) = 0;
 
         /**
          * When called the ResponseBuilder must construct all the
@@ -59,7 +59,7 @@ namespace mock {
          * @param queue - Queue of Command sent back from the broker.
          */
         virtual void buildIncomingCommands(
-            const Pointer<Command>& command,
+            const Pointer<Command> command,
             decaf::util::LinkedList< Pointer<Command> >& queue ) = 0;
 
     };

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.cpp Thu Oct 11 22:39:46 2012
@@ -38,7 +38,7 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-SslTransport::SslTransport( const Pointer<Transport>& next ) : TcpTransport( next ) {
+SslTransport::SslTransport(const Pointer<Transport> next) : TcpTransport(next) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -53,32 +53,31 @@ Socket* SslTransport::createSocket() {
         SocketFactory* factory = SSLSocketFactory::getDefault();
         return factory->createSocket();
     }
-    DECAF_CATCH_RETHROW( IOException )
-    DECAF_CATCH_EXCEPTION_CONVERT( Exception, IOException )
-    DECAF_CATCHALL_THROW( IOException )
+    DECAF_CATCH_RETHROW(IOException)
+    DECAF_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    DECAF_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SslTransport::configureSocket( Socket* socket, decaf::util::Properties& properties ) {
+void SslTransport::configureSocket(Socket* socket, decaf::util::Properties& properties) {
 
-    try{
+    try {
 
-        if( socket == NULL ) {
-            throw NullPointerException(
-                __FILE__, __LINE__, "Socket instance passed was NULL" );
+        if (socket == NULL) {
+            throw NullPointerException(__FILE__, __LINE__, "Socket instance passed was NULL");
         }
 
-        SSLSocket* sslSocket = dynamic_cast<SSLSocket*>( socket );
-        if( sslSocket == NULL ) {
-            throw IllegalArgumentException(
-                __FILE__, __LINE__, "Socket passed was not an SSLSocket instance." );
+        SSLSocket* sslSocket = dynamic_cast<SSLSocket*>(socket);
+        if (sslSocket == NULL) {
+            throw IllegalArgumentException(__FILE__, __LINE__,
+                "Socket passed was not an SSLSocket instance.");
         }
 
-        TcpTransport::configureSocket( socket, properties );
+        TcpTransport::configureSocket(socket, properties);
     }
-    DECAF_CATCH_RETHROW( NullPointerException )
-    DECAF_CATCH_RETHROW( IllegalArgumentException )
-    DECAF_CATCH_RETHROW( SocketException )
-    DECAF_CATCH_EXCEPTION_CONVERT( Exception, SocketException )
-    DECAF_CATCHALL_THROW( SocketException )
+    DECAF_CATCH_RETHROW(NullPointerException)
+    DECAF_CATCH_RETHROW(IllegalArgumentException)
+    DECAF_CATCH_RETHROW(SocketException)
+    DECAF_CATCH_EXCEPTION_CONVERT(Exception, SocketException)
+    DECAF_CATCHALL_THROW(SocketException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransport.h Thu Oct 11 22:39:46 2012
@@ -36,8 +36,8 @@ namespace tcp {
     class AMQCPP_API SslTransport : public TcpTransport {
     private:
 
-        SslTransport( const SslTransport& );
-        SslTransport& operator= ( const SslTransport& );
+        SslTransport(const SslTransport&);
+        SslTransport& operator=(const SslTransport&);
 
     public:
 
@@ -47,7 +47,7 @@ namespace tcp {
          *
          * @param next the next transport in the chain
          */
-        SslTransport( const Pointer<Transport>& next );
+        SslTransport(const Pointer<Transport> next);
 
         virtual ~SslTransport();
 
@@ -61,8 +61,7 @@ namespace tcp {
         /**
          * {@inheritDoc}
          */
-        virtual void configureSocket( decaf::net::Socket* socket, decaf::util::Properties& properties );
-
+        virtual void configureSocket(decaf::net::Socket* socket, decaf::util::Properties& properties);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.cpp Thu Oct 11 22:39:46 2012
@@ -44,35 +44,34 @@ SslTransportFactory::~SslTransportFactor
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> SslTransportFactory::doCreateComposite( const decaf::net::URI& location,
-                                                           const Pointer<wireformat::WireFormat>& wireFormat,
-                                                           const decaf::util::Properties& properties ) {
+Pointer<Transport> SslTransportFactory::doCreateComposite(const decaf::net::URI& location,
+                                                          const Pointer<wireformat::WireFormat> wireFormat,
+                                                          const decaf::util::Properties& properties) {
 
     try {
 
-        Pointer<Transport> transport( new SslTransport(
-            Pointer<Transport>( new IOTransport( wireFormat ) ) ) );
+        Pointer<Transport> transport(new SslTransport(Pointer<Transport>(new IOTransport(wireFormat))));
 
-        transport.dynamicCast<SslTransport>()->connect( location, properties );
+        transport.dynamicCast<SslTransport>()->connect(location, properties);
 
-        if( properties.getProperty( "transport.useInactivityMonitor", "true" ) == "true" ) {
-            transport.reset( new InactivityMonitor( transport, properties, wireFormat ) );
+        if (properties.getProperty("transport.useInactivityMonitor", "true") == "true") {
+            transport.reset(new InactivityMonitor(transport, properties, wireFormat));
         }
 
         // If command tracing was enabled, wrap the transport with a logging transport.
-        if( properties.getProperty( "transport.commandTracingEnabled", "false" ) == "true" ) {
+        if (properties.getProperty("transport.commandTracingEnabled", "false") == "true") {
             // Create the Transport for response correlator
-            transport.reset( new LoggingTransport( transport ) );
+            transport.reset(new LoggingTransport(transport));
         }
 
         // If there is a negotiator need then we create and wrap here.
-        if( wireFormat->hasNegotiator() ) {
-            transport = wireFormat->createNegotiator( transport );
+        if (wireFormat->hasNegotiator()) {
+            transport = wireFormat->createNegotiator(transport);
         }
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/SslTransportFactory.h Thu Oct 11 22:39:46 2012
@@ -35,9 +35,9 @@ namespace tcp {
 
     protected:
 
-        virtual Pointer<Transport> doCreateComposite( const decaf::net::URI& location,
-                                                      const Pointer<wireformat::WireFormat>& wireFormat,
-                                                      const decaf::util::Properties& properties );
+        virtual Pointer<Transport> doCreateComposite(const decaf::net::URI& location,
+                                                     const Pointer<wireformat::WireFormat> wireFormat,
+                                                     const decaf::util::Properties& properties );
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp Thu Oct 11 22:39:46 2012
@@ -42,7 +42,7 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-TcpTransport::TcpTransport(const Pointer<Transport>& next) :
+TcpTransport::TcpTransport(const Pointer<Transport> next) :
     TransportFilter(next), connectTimeout(0), closed(false), socket(), dataInputStream(), dataOutputStream() {
 }
 
@@ -69,9 +69,9 @@ void TcpTransport::close() {
         // Invoke the paren't close first.
         TransportFilter::close();
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -141,9 +141,9 @@ void TcpTransport::connect(const decaf::
         ioTransport->setInputStream(dataInputStream.get());
         ioTransport->setOutputStream(dataOutputStream.get());
     }
-    AMQ_CATCH_RETHROW( ActiveMQException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException)
-    AMQ_CATCHALL_THROW( ActiveMQException)
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -153,9 +153,9 @@ Socket* TcpTransport::createSocket() {
         SocketFactory* factory = SocketFactory::getDefault();
         return factory->createSocket();
     }
-    DECAF_CATCH_RETHROW( IOException)
-    DECAF_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    DECAF_CATCHALL_THROW( IOException)
+    DECAF_CATCH_RETHROW(IOException)
+    DECAF_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    DECAF_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -197,9 +197,9 @@ void TcpTransport::configureSocket(Socke
             socket->setSendBufferSize(soSendBufferSize);
         }
     }
-    DECAF_CATCH_RETHROW( NullPointerException)
-    DECAF_CATCH_RETHROW( IllegalArgumentException)
-    DECAF_CATCH_RETHROW( SocketException)
-    DECAF_CATCH_EXCEPTION_CONVERT( Exception, SocketException)
-    DECAF_CATCHALL_THROW( SocketException)
+    DECAF_CATCH_RETHROW(NullPointerException)
+    DECAF_CATCH_RETHROW(IllegalArgumentException)
+    DECAF_CATCH_RETHROW(SocketException)
+    DECAF_CATCH_EXCEPTION_CONVERT(Exception, SocketException)
+    DECAF_CATCHALL_THROW(SocketException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.h Thu Oct 11 22:39:46 2012
@@ -39,12 +39,11 @@ namespace tcp{
     using decaf::lang::Pointer;
 
     /**
-     * Implements a TCP/IP based transport filter, this transport
-     * is meant to wrap an instance of an IOTransport.  The lower
-     * level transport should take care of managing stream reads
-     * and writes.
+     * Implements a TCP/IP based transport filter, this transport is meant to
+     * wrap an instance of an IOTransport.  The lower level transport should take
+     * care of managing stream reads and writes.
      */
-    class AMQCPP_API TcpTransport : public TransportFilter {
+    class AMQCPP_API TcpTransport: public TransportFilter {
     private:
 
         /**
@@ -74,8 +73,8 @@ namespace tcp{
 
     private:
 
-        TcpTransport( const TcpTransport& );
-        TcpTransport& operator= ( const TcpTransport& );
+        TcpTransport(const TcpTransport&);
+        TcpTransport& operator=(const TcpTransport&);
 
     public:
 
@@ -86,7 +85,7 @@ namespace tcp{
          * @param next
          *      The next transport in the chain
          */
-        TcpTransport( const Pointer<Transport>& next );
+        TcpTransport(const Pointer<Transport> next);
 
         virtual ~TcpTransport();
 
@@ -100,9 +99,9 @@ namespace tcp{
          * @param properties
          *      The Properties that have been parsed from the URI or from configuration files.
          */
-        void connect( const decaf::net::URI& uri, const decaf::util::Properties& properties );
+        void connect(const decaf::net::URI& uri, const decaf::util::Properties& properties);
 
-    public:  // Transport Methods
+    public: // Transport Methods
 
         virtual void close();
 
@@ -111,7 +110,7 @@ namespace tcp{
         }
 
         virtual bool isConnected() const {
-            if( this->socket.get() != NULL ) {
+            if (this->socket.get() != NULL) {
                 return this->socket->isConnected();
             }
 
@@ -147,8 +146,7 @@ namespace tcp{
          * @throw IllegalArgumentException if the socket instance is not handled by the class.
          * @throw SocketException if there is an error while setting one of the Socket options.
          */
-        virtual void configureSocket( decaf::net::Socket* socket,
-                                      const decaf::util::Properties& properties );
+        virtual void configureSocket(decaf::net::Socket* socket, const decaf::util::Properties& properties);
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp Thu Oct 11 22:39:46 2012
@@ -39,82 +39,79 @@ using namespace decaf;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> TcpTransportFactory::create( const decaf::net::URI& location ) {
+Pointer<Transport> TcpTransportFactory::create(const decaf::net::URI& location) {
 
-    try{
+    try {
 
-        Properties properties =
-            activemq::util::URISupport::parseQuery( location.getQuery() );
+        Properties properties = activemq::util::URISupport::parseQuery(location.getQuery());
 
-        Pointer<WireFormat> wireFormat = this->createWireFormat( properties );
+        Pointer<WireFormat> wireFormat = this->createWireFormat(properties);
 
         // Create the initial Transport, then wrap it in the normal Filters
-        Pointer<Transport> transport( doCreateComposite( location, wireFormat, properties ) );
+        Pointer<Transport> transport(doCreateComposite(location, wireFormat, properties));
 
         // Create the Transport for response correlator
-        transport.reset( new ResponseCorrelator( transport ) );
+        transport.reset(new ResponseCorrelator(transport));
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> TcpTransportFactory::createComposite( const decaf::net::URI& location ) {
+Pointer<Transport> TcpTransportFactory::createComposite(const decaf::net::URI& location) {
 
-    try{
+    try {
 
-        Properties properties =
-            activemq::util::URISupport::parseQuery( location.getQuery() );
+        Properties properties = activemq::util::URISupport::parseQuery(location.getQuery());
 
-        Pointer<WireFormat> wireFormat = this->createWireFormat( properties );
+        Pointer<WireFormat> wireFormat = this->createWireFormat(properties);
 
         // Create the initial Transport, then wrap it in the normal Filters
-        return doCreateComposite( location, wireFormat, properties );
+        return doCreateComposite(location, wireFormat, properties);
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Transport> TcpTransportFactory::doCreateComposite( const decaf::net::URI& location,
-                                                           const Pointer<wireformat::WireFormat>& wireFormat,
-                                                           const decaf::util::Properties& properties ) {
+Pointer<Transport> TcpTransportFactory::doCreateComposite(const decaf::net::URI& location,
+                                                          const Pointer<wireformat::WireFormat> wireFormat,
+                                                          const decaf::util::Properties& properties) {
 
     try {
 
-        Pointer<Transport> transport( new TcpTransport(
-            Pointer<Transport>( new IOTransport( wireFormat ) ) ) );
+        Pointer<Transport> transport(new TcpTransport(Pointer<Transport>(new IOTransport(wireFormat))));
 
         // Initialize the Transport, creates Sockets and configures defaults.
-        transport.dynamicCast<TcpTransport>()->connect( location, properties );
+        transport.dynamicCast<TcpTransport>()->connect(location, properties);
 
-        if( properties.getProperty( "transport.useInactivityMonitor", "true" ) == "true" ) {
-            transport.reset( new InactivityMonitor( transport, properties, wireFormat ) );
+        if (properties.getProperty("transport.useInactivityMonitor", "true") == "true") {
+            transport.reset(new InactivityMonitor(transport, properties, wireFormat));
         }
 
         // If command tracing was enabled, wrap the transport with a logging transport.
         // We support the old CMS value, the ActiveMQ trace value and the NMS useLogging
         // value in order to be more friendly.
-        if( properties.getProperty( "transport.commandTracingEnabled", "false" ) == "true" ||
-            properties.getProperty( "transport.useLogging", "false" ) == "true"  ||
-            properties.getProperty( "transport.trace", "false" ) == "true" ) {
+        if (properties.getProperty("transport.commandTracingEnabled", "false") == "true" ||
+            properties.getProperty("transport.useLogging", "false") == "true" ||
+            properties.getProperty("transport.trace", "false") == "true") {
 
             // Create the Transport for response correlator
-            transport.reset( new LoggingTransport( transport ) );
+            transport.reset(new LoggingTransport(transport));
         }
 
         // If there is a negotiator need then we create and wrap here.
-        if( wireFormat->hasNegotiator() ) {
-            transport = wireFormat->createNegotiator( transport );
+        if (wireFormat->hasNegotiator()) {
+            transport = wireFormat->createNegotiator(transport);
         }
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.h Thu Oct 11 22:39:46 2012
@@ -36,16 +36,15 @@ namespace tcp{
 
         virtual ~TcpTransportFactory() {}
 
-        virtual Pointer<Transport> create( const decaf::net::URI& location );
+        virtual Pointer<Transport> create(const decaf::net::URI& location);
 
-        virtual Pointer<Transport> createComposite( const decaf::net::URI& location );
+        virtual Pointer<Transport> createComposite(const decaf::net::URI& location);
 
     protected:
 
-        virtual Pointer<Transport> doCreateComposite( const decaf::net::URI& location,
-                                                      const Pointer<wireformat::WireFormat>& wireFormat,
-                                                      const decaf::util::Properties& properties );
-
+        virtual Pointer<Transport> doCreateComposite(const decaf::net::URI& location,
+                                                     const Pointer<wireformat::WireFormat> wireFormat,
+                                                     const decaf::util::Properties& properties );
     };
 
 }}}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.cpp?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.cpp Thu Oct 11 22:39:46 2012
@@ -46,7 +46,7 @@ using namespace decaf;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<Response> OpenWireResponseBuilder::buildResponse(const Pointer<Command>& command) {
+Pointer<Response> OpenWireResponseBuilder::buildResponse(const Pointer<Command> command) {
 
     if (command->isResponseRequired()) {
         // These Commands just require a response that matches their command IDs
@@ -59,7 +59,7 @@ Pointer<Response> OpenWireResponseBuilde
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenWireResponseBuilder::buildIncomingCommands(const Pointer<Command>& command, decaf::util::LinkedList<Pointer<Command> >& queue) {
+void OpenWireResponseBuilder::buildIncomingCommands(const Pointer<Command> command, decaf::util::LinkedList<Pointer<Command> >& queue) {
 
     // Delegate this to buildResponse
     if (command->isResponseRequired()) {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.h?rev=1397341&r1=1397340&r2=1397341&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireResponseBuilder.h Thu Oct 11 22:39:46 2012
@@ -38,9 +38,9 @@ namespace openwire{
         OpenWireResponseBuilder() {}
         virtual ~OpenWireResponseBuilder() {}
 
-        virtual Pointer<commands::Response> buildResponse(const Pointer<commands::Command>& command);
+        virtual Pointer<commands::Response> buildResponse(const Pointer<commands::Command> command);
 
-        virtual void buildIncomingCommands(const Pointer<commands::Command>& command,
+        virtual void buildIncomingCommands(const Pointer<commands::Command> command,
                                            decaf::util::LinkedList<Pointer<commands::Command> >& queue);
 
     };

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/AsyncCallback.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/AsyncCallback.cpp?rev=1397341&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/AsyncCallback.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/AsyncCallback.cpp Thu Oct 11 22:39:46 2012
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AsyncCallback.h"
+
+using namespace cms;
+
+AsyncCallback::~AsyncCallback() {
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/AsyncCallback.cpp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message