activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r511939 - in /activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http: HttpClientTransport.java HttpTransportSupport.java
Date Mon, 26 Feb 2007 18:16:07 GMT
Author: jstrachan
Date: Mon Feb 26 10:16:06 2007
New Revision: 511939

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

Modified:
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
    activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.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?view=diff&rev=511939&r1=511938&r2=511939
==============================================================================
--- 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
Mon Feb 26 10:16:06 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/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java?view=diff&rev=511939&r1=511938&r2=511939
==============================================================================
--- activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
(original)
+++ activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
Mon Feb 26 10:16:06 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