chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1085324 - in /chemistry/dotcmis/trunk/DotCMIS: binding/http.cs const.cs
Date Fri, 25 Mar 2011 11:22:27 GMT
Author: fmui
Date: Fri Mar 25 11:22:27 2011
New Revision: 1085324

URL: http://svn.apache.org/viewvc?rev=1085324&view=rev
Log:
- added HTTP timeouts

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/http.cs
    chemistry/dotcmis/trunk/DotCMIS/const.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/http.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/http.cs?rev=1085324&r1=1085323&r2=1085324&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/http.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/http.cs Fri Mar 25 11:22:27 2011
@@ -74,6 +74,19 @@ namespace DotCMIS.Binding.Impl
                 conn.Method = method;
                 conn.UserAgent = "Apache Chemistry DotCMIS";
 
+                // timeouts
+                int connectTimeout = session.GetValue(SessionParameter.ConnectTimeout, -2);
+                if (connectTimeout >= -1)
+                {
+                    conn.Timeout = connectTimeout;
+                }
+
+                int readTimeout = session.GetValue(SessionParameter.ReadTimeout, -2);
+                if (readTimeout >= -1)
+                {
+                    conn.ReadWriteTimeout = readTimeout;
+                }
+
                 // set content type
                 if (contentType != null)
                 {

Modified: chemistry/dotcmis/trunk/DotCMIS/const.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/const.cs?rev=1085324&r1=1085323&r2=1085324&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/const.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/const.cs Fri Mar 25 11:22:27 2011
@@ -47,10 +47,10 @@ namespace DotCMIS
         public const string WebServicesAclService = "org.apache.chemistry.dotcmis.binding.webservices.ACLService";
 
         public const string WebServicesWCFBinding = "org.apache.chemistry.dotcmis.binding.webservices.wcfbinding";
-        public const string WebServicesOpenTimeout = "org.apache.chemistry.dotcmis.binding.webservices.openTimeout";
-        public const string WebServicesCloseTimeout = "org.apache.chemistry.dotcmis.binding.webservices.closeTimeout";
-        public const string WebServicesSendTimeout = "org.apache.chemistry.dotcmis.binding.webservices.sendTimeout";
-        public const string WebServicesReceiveTimeout = "org.apache.chemistry.dotcmis.binding.webservices.receiveTimeout";
+        public const string WebServicesOpenTimeout = "org.apache.chemistry.dotcmis.binding.webservices.opentimeout";
+        public const string WebServicesCloseTimeout = "org.apache.chemistry.dotcmis.binding.webservices.closetimeout";
+        public const string WebServicesSendTimeout = "org.apache.chemistry.dotcmis.binding.webservices.sendtimeout";
+        public const string WebServicesReceiveTimeout = "org.apache.chemistry.dotcmis.binding.webservices.receivetimeout";
 
         public const string WebServicesEnableUnsecuredResponse = "org.apache.chemistry.dotcmis.binding.webservices.enableUnsecuredResponse";
// requires hotfix 971493 or the .NET framework 4 
 
@@ -60,6 +60,10 @@ namespace DotCMIS
         // compression flag
         public const string Compression = "org.apache.chemistry.dotcmis.binding.compression";
 
+        // timeouts
+        public const string ConnectTimeout = "org.apache.chemistry.dotcmis.binding.connecttimeout";
+        public const string ReadTimeout = "org.apache.chemistry.dotcmis.binding.readtimeout";
+
         // binding caches
         public const string CacheSizeRepositories = "org.apache.chemistry.dotcmis.binding.cache.repositories.size";
         public const string CacheSizeTypes = "org.apache.chemistry.dotcmis.binding.cache.types.size";



Mime
View raw message