mirror of https://github.com/apache/activemq.git
added patch for AMQ-1099
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@511939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3fd0a65b1
commit
63b2d6837d
|
@ -194,7 +194,11 @@ public class HttpClientTransport extends HttpTransportSupport {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -30,6 +30,8 @@ import java.net.URI;
|
|||
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;
|
||||
|
@ -57,4 +59,20 @@ public abstract class HttpTransportSupport extends TransportThreadSupport {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue