activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r880978 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/inactivity: InactivityMonitor.cpp InactivityMonitor.h
Date Mon, 16 Nov 2009 21:45:22 GMT
Author: tabish
Date: Mon Nov 16 21:45:21 2009
New Revision: 880978

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

Add an additional constructor that accepts a Properties object which is used to read settings
for the options not set by value in the WireFormatInfo command.

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

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=880978&r1=880977&r2=880978&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
Mon Nov 16 21:45:21 2009
@@ -28,6 +28,7 @@
 #include <decaf/lang/Math.h>
 #include <decaf/lang/Thread.h>
 #include <decaf/lang/Runnable.h>
+#include <decaf/lang/Boolean.h>
 
 using namespace std;
 using namespace activemq;
@@ -186,6 +187,26 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
+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;
+    this->members->monitorStarted = false;
+    this->members->commandSent = false;
+    this->members->commandReceived = true;
+    this->members->failed = false;
+    this->members->inRead = false;
+    this->members->inWrite = false;
+    this->members->readCheckTime = 0;
+    this->members->writeCheckTime = 0;
+    this->members->initialDelayTime = 0;
+    this->members->keepAliveResponseRequired =
+        Boolean::parseBoolean( properties.getProperty( "keepAliveResponseRequired", false
) );
+}
+
+////////////////////////////////////////////////////////////////////////////////
 InactivityMonitor::~InactivityMonitor() {
     try{
         this->stopMonitorThreads();

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=880978&r1=880977&r2=880978&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
Mon Nov 16 21:45:21 2009
@@ -28,6 +28,7 @@
 
 #include <decaf/lang/Pointer.h>
 #include <decaf/util/Timer.h>
+#include <decaf/util/Properties.h>
 #include <decaf/util/concurrent/atomic/AtomicBoolean.h>
 
 #include <memory>
@@ -57,13 +58,12 @@
 
     public:
 
-        /**
-         * Constructor
-         *
-         * @param next
-         *      The Transport instance that this TransportFilter wraps.
-         */
-        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 );
 
         virtual ~InactivityMonitor();
 



Mime
View raw message