Package org.eclipse.jetty.client
Class ProxyConfiguration
java.lang.Object
org.eclipse.jetty.client.ProxyConfiguration
The configuration of the forward proxy to use with
HttpClient
.
Applications add subclasses of ProxyConfiguration.Proxy
to this configuration via:
ProxyConfiguration proxyConfig = httpClient.getProxyConfiguration(); proxyConfig.addProxy(new HttpProxy(proxyHost, 8080));
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProxy
(ProxyConfiguration.Proxy proxy) Adds a proxy.Deprecated.boolean
Removes a proxy.
-
Constructor Details
-
ProxyConfiguration
public ProxyConfiguration()
-
-
Method Details
-
getProxies
Deprecated.useaddProxy(Proxy)
andremoveProxy(Proxy)
insteadReturns the list of proxies added to this configuration.
This method is deprecated because it has historically been used to add/remove proxies directly to/from the returned list, but this has now been replaced by
addProxy(Proxy)
andremoveProxy(Proxy)
instead.In the future, this method will return an unmodifiable list of proxies just for querying purposes.
- Returns:
- the forward proxies to use
-
addProxy
Adds a proxy.- Parameters:
proxy
- a proxy- Throws:
NullPointerException
- ifproxy
is null
-
removeProxy
Removes a proxy.- Parameters:
proxy
- a proxy- Returns:
- true if a match is found
-
match
-
addProxy(Proxy)
andremoveProxy(Proxy)
instead