@Immutable public final class ProxySettings extends Object implements IProxySettings
IProxySettings| Constructor and Description |
|---|
ProxySettings(Proxy.Type eProxyType,
String sProxyHost,
int nProxyPort) |
ProxySettings(Proxy.Type eProxyType,
String sProxyHost,
int nProxyPort,
String sProxyUserName,
String sProxyPassword) |
| Modifier and Type | Method and Description |
|---|---|
static ProxySettings |
createNoProxySettings() |
boolean |
equals(Object o) |
Proxy |
getAsProxy(boolean bResolveHostname) |
String |
getProxyHost() |
String |
getProxyPassword() |
int |
getProxyPort() |
Proxy.Type |
getProxyType() |
String |
getProxyUserName() |
int |
hashCode() |
boolean |
hasSocketAddress(SocketAddress aAddr)
Check if these settings have the provided socket address.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsPasswordAuthentication, getAsProxy, hasInetSocketAddress, hasProxyPassword, hasProxyUserNamepublic ProxySettings(@Nonnull Proxy.Type eProxyType, @Nullable String sProxyHost, @Nonnegative int nProxyPort)
public ProxySettings(@Nonnull Proxy.Type eProxyType, @Nullable String sProxyHost, @Nonnegative int nProxyPort, @Nullable String sProxyUserName, @Nullable String sProxyPassword)
@Nonnull public Proxy.Type getProxyType()
getProxyType in interface IProxySettingsnull.@Nullable public String getProxyHost()
getProxyHost in interface IProxySettingsnull if
proxy type is DIRECT.@Nonnegative public int getProxyPort()
getProxyPort in interface IProxySettings@Nullable public String getProxyUserName()
getProxyUserName in interface IProxySettingsnull.@Nullable public String getProxyPassword()
getProxyPassword in interface IProxySettingsnull.
Note: an empty password may be valid. Only null
indicates "no password".public boolean hasSocketAddress(@Nullable SocketAddress aAddr)
IProxySettingshasSocketAddress in interface IProxySettingsaAddr - The socket address to compare to. May be null.true if the proxy type is DIRECT and the address is
null, or if the object is of type
InetSocketAddress and the values match.IProxySettings.hasInetSocketAddress(InetSocketAddress)@Nonnull public Proxy getAsProxy(boolean bResolveHostname)
getAsProxy in interface IProxySettingsbResolveHostname - true to resolve host names (needed in production) or
false to not resolve them (mainly for testing
purposes). This flag has no impact if the proxy type is DIRECT.null Proxy instance. Only uses proxy
host and port.IProxySettings.getProxyHost(),
IProxySettings.getProxyPort()@Nonnull @ReturnsMutableCopy public static ProxySettings createNoProxySettings()
Copyright © 2016–2019 Philip Helger. All rights reserved.