activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1068880 - /activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
Date Wed, 09 Feb 2011 13:35:00 GMT
Author: dejanb
Date: Wed Feb  9 13:34:59 2011
New Revision: 1068880

URL: http://svn.apache.org/viewvc?rev=1068880&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3175 - configurable soTimeout for http(s) transport

Modified:
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java

Modified: activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java?rev=1068880&r1=1068879&r2=1068880&view=diff
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
Wed Feb  9 13:34:59 2011
@@ -59,6 +59,8 @@ public class HttpClientTransport extends
     private boolean trace;
     private GetMethod httpMethod;
     private volatile int receiveCounter;
+
+    private int soTimeout = MAX_CLIENT_TIMEOUT;
     
     public HttpClientTransport(TextWireFormat wireFormat, URI remoteUrl) {
         super(wireFormat, remoteUrl);
@@ -84,7 +86,7 @@ public class HttpClientTransport extends
 
             HttpClient client = getSendHttpClient();
             HttpClientParams params = new HttpClientParams();
-            params.setSoTimeout(MAX_CLIENT_TIMEOUT);
+            params.setSoTimeout(soTimeout);
             client.setParams(params);
             int answer = client.executeMethod(httpMethod);
             if (answer != HttpStatus.SC_OK) {
@@ -227,4 +229,11 @@ public class HttpClientTransport extends
         return receiveCounter;
     }
 
+    public int getSoTimeout() {
+        return soTimeout;
+    }
+
+    public void setSoTimeout(int soTimeout) {
+        this.soTimeout = soTimeout;
+    }
 }



Mime
View raw message