activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r881001 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp
Date Mon, 16 Nov 2009 22:12:25 GMT
Author: tabish
Date: Mon Nov 16 22:12:24 2009
New Revision: 881001

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

Enable creation of the InactivityMonitor in the TcpTransportFactory.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransportFactory.cpp

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=881001&r1=881000&r2=881001&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
Mon Nov 16 22:12:24 2009
@@ -21,6 +21,7 @@
 #include <activemq/transport/tcp/TcpTransport.h>
 #include <activemq/transport/correlator/ResponseCorrelator.h>
 #include <activemq/transport/logging/LoggingTransport.h>
+#include <activemq/transport/inactivity/InactivityMonitor.h>
 #include <activemq/util/URISupport.h>
 #include <activemq/wireformat/WireFormat.h>
 #include <decaf/util/Properties.h>
@@ -32,6 +33,7 @@
 using namespace activemq::transport::tcp;
 using namespace activemq::transport::correlator;
 using namespace activemq::transport::logging;
+using namespace activemq::transport::inactivity;
 using namespace activemq::exceptions;
 using namespace decaf;
 using namespace decaf::lang;
@@ -96,6 +98,10 @@
         Pointer<Transport> transport( new TcpTransport(
             location, properties, Pointer<Transport>( new IOTransport( wireFormat )
) ) );
 
+        if( properties.getProperty( "useInactivityMonitor", "true" ) == "true" ) {
+            transport.reset( new InactivityMonitor( transport, properties, wireFormat ) );
+        }
+
         // If there is a negotiator need then we create and wrap here.
         if( wireFormat->hasNegotiator() ) {
             transport = wireFormat->createNegotiator( transport );



Mime
View raw message