activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r511940 - in /activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http: HttpClientTransport.java HttpTransportSupport.java
Date Mon, 26 Feb 2007 18:17:58 GMT
Author: jstrachan
Date: Mon Feb 26 10:17:58 2007
New Revision: 511940

URL: http://svn.apache.org/viewvc?view=rev&rev=511940
Log:
Added patch for AMQ-1099

Modified:
    activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
    activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java

Modified: activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java?view=diff&rev=511940&r1=511939&r2=511940
==============================================================================
--- activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
(original)
+++ activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
Mon Feb 26 10:17:58 2007
@@ -194,7 +194,11 @@
     }
 
     protected HttpClient createHttpClient() {
-        return new HttpClient();
+        HttpClient client = new HttpClient();
+        if (getProxyHost() != null) {
+            client.getHostConfiguration().setProxy(getProxyHost(), getProxyPort());
+        }
+        return client;
     }
 
     protected void configureMethod(HttpMethod method) {

Modified: activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java?view=diff&rev=511940&r1=511939&r2=511940
==============================================================================
--- activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
(original)
+++ activemq/branches/activemq-4.1/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
Mon Feb 26 10:17:58 2007
@@ -30,6 +30,8 @@
 public abstract class HttpTransportSupport extends TransportThreadSupport {
     private TextWireFormat textWireFormat;
     private URI remoteUrl;
+    private String proxyHost;
+    private int proxyPort = 8080;
 
     public HttpTransportSupport(TextWireFormat textWireFormat, URI remoteUrl) {
         this.textWireFormat = textWireFormat;
@@ -56,5 +58,21 @@
 
     public void setTextWireFormat(TextWireFormat textWireFormat) {
         this.textWireFormat = textWireFormat;
+    }
+
+    public String getProxyHost() {
+        return proxyHost;
+    }
+
+    public void setProxyHost(String proxyHost) {
+        this.proxyHost = proxyHost;
+    }
+
+    public int getProxyPort() {
+        return proxyPort;
+    }
+
+    public void setProxyPort(int proxyPort) {
+        this.proxyPort = proxyPort;
     }
 }



Mime
View raw message