activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r764908 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq: commands/WireFormatInfo.cpp commands/WireFormatInfo.h wireformat/openwire/OpenWireFormatFactory.cpp wireformat/openwire/OpenWireFormatFactory.h
Date Tue, 14 Apr 2009 18:00:54 GMT
Author: tabish
Date: Tue Apr 14 18:00:53 2009
New Revision: 764908

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

Adds max inactivity duration configuration to the wireformat URI for Openwire.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.cpp?rev=764908&r1=764907&r2=764908&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.cpp
Tue Apr 14 18:00:53 2009
@@ -164,7 +164,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 decaf::lang::Pointer<commands::Command> WireFormatInfo::visit( activemq::state::CommandVisitor*
visitor )
-	throw( activemq::exceptions::ActiveMQException ) {
+    throw( activemq::exceptions::ActiveMQException ) {
 
     return visitor->processWireFormat( this );
 }
@@ -332,3 +332,43 @@
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
     AMQ_CATCHALL_THROW( decaf::io::IOException )
 }
+
+////////////////////////////////////////////////////////////////////////////////
+long long WireFormatInfo::getMaxInactivityDuration() const {
+    try {
+        return properties.getLong( "MaxInactivityDuration" );
+    }
+    AMQ_CATCH_NOTHROW( exceptions::ActiveMQException )
+    AMQ_CATCHALL_NOTHROW()
+
+    return 0LL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void WireFormatInfo::setMaxInactivityDuration( long long maxInactivityDuration ) {
+    try {
+        properties.setLong( "MaxInactivityDuration", maxInactivityDuration );
+    }
+    AMQ_CATCH_NOTHROW( exceptions::ActiveMQException )
+    AMQ_CATCHALL_NOTHROW()
+}
+
+////////////////////////////////////////////////////////////////////////////////
+long long WireFormatInfo::getMaxInactivityDurationInitalDelay() const {
+    try {
+        return properties.getLong( "MaxInactivityDurationInitalDelay" );
+    }
+    AMQ_CATCH_NOTHROW( exceptions::ActiveMQException )
+    AMQ_CATCHALL_NOTHROW()
+
+    return 0LL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void WireFormatInfo::setMaxInactivityDurationInitalDelay( long long maxInactivityDurationInitalDelay
) {
+    try {
+        properties.setLong( "MaxInactivityDurationInitalDelay", maxInactivityDurationInitalDelay
);
+    }
+    AMQ_CATCH_NOTHROW( exceptions::ActiveMQException )
+    AMQ_CATCHALL_NOTHROW()
+}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.h?rev=764908&r1=764907&r2=764908&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/WireFormatInfo.h Tue
Apr 14 18:00:53 2009
@@ -126,6 +126,30 @@
         }
 
         /**
+         * Returns the currently configured Max Inactivity duration.
+         * @return the set inactivity duration value.
+         */
+        long long getMaxInactivityDuration() const;
+
+        /**
+         * Sets the Max inactivity duration value.
+         * @param maxInactivityDuration - max time a client can be inactive.
+         */
+        void setMaxInactivityDuration( long long maxInactivityDuration );
+
+        /**
+         * Returns the currently configured Max Inactivity Intial Delay duration.
+         * @return the set inactivity duration initial delay value.
+         */
+        long long getMaxInactivityDurationInitalDelay() const;
+
+        /**
+         * Sets the Max inactivity initial delay duration value.
+         * @param maxInactivityDurationInitalDelay - time before the inactivity delay is
checked.
+         */
+        void setMaxInactivityDurationInitalDelay( long long maxInactivityDurationInitalDelay
);
+
+        /**
          * Checks if the stackTraceEnabled flag is on
          * @return true if the flag is on.
          */

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.cpp?rev=764908&r1=764907&r2=764908&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.cpp
Tue Apr 14 18:00:53 2009
@@ -20,6 +20,7 @@
 
 #include <decaf/lang/Boolean.h>
 #include <decaf/lang/Integer.h>
+#include <decaf/lang/Long.h>
 #include <decaf/lang/Pointer.h>
 
 using namespace std;
@@ -62,6 +63,12 @@
         info->setSizePrefixDisabled( Boolean::parseBoolean(
             properties.getProperty( "wireFormat.sizePrefixDisabled",
                                     "false" ) ) );
+        info->setMaxInactivityDuration( Long::parseLong(
+            properties.getProperty( "wireFormat.MaxInactivityDuration",
+                                    "30000" ) ) );
+        info->setMaxInactivityDurationInitalDelay( Long::parseLong(
+            properties.getProperty( "wireFormat.MaxInactivityDurationInitalDelay",
+                                    "10000" ) ) );
 
         // Create the Openwire Format Object
         Pointer<OpenWireFormat> wireFormat( new OpenWireFormat( properties ) );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.h?rev=764908&r1=764907&r2=764908&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/OpenWireFormatFactory.h
Tue Apr 14 18:00:53 2009
@@ -47,6 +47,7 @@
          * wireFormat.tightEncodingEnabled
          * wireFormat.sizePrefixDisabled
          * wireFormat.maxInactivityDuration
+         * wireFormat.maxInactivityDurationInitialDelay
          */
         OpenWireFormatFactory() {}
 



Mime
View raw message