public interface IProxySettings extends Serializable
| Modifier and Type | Method and Description |
|---|---|
default PasswordAuthentication |
getAsPasswordAuthentication() |
default Proxy |
getAsProxy() |
Proxy |
getAsProxy(boolean bResolveHostname) |
String |
getProxyHost() |
String |
getProxyPassword() |
int |
getProxyPort() |
Proxy.Type |
getProxyType() |
String |
getProxyUserName() |
default boolean |
hasInetSocketAddress(InetSocketAddress aAddr)
Check if hostname and port match the ones from the provided
InetSocketAddress. |
default boolean |
hasProxyPassword() |
default boolean |
hasProxyUserName() |
boolean |
hasSocketAddress(SocketAddress aAddr)
Check if these settings have the provided socket address.
|
@Nonnull Proxy.Type getProxyType()
null.@Nullable String getProxyHost()
null if
proxy type is DIRECT.int getProxyPort()
default boolean hasProxyUserName()
@Nullable String getProxyPassword()
null.
Note: an empty password may be valid. Only null
indicates "no password".default boolean hasProxyPassword()
default boolean hasInetSocketAddress(@Nullable InetSocketAddress aAddr)
InetSocketAddress.aAddr - The address to compare with. May be null.true if the unresolved hostname and the port match.boolean hasSocketAddress(@Nullable SocketAddress aAddr)
aAddr - 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.hasInetSocketAddress(InetSocketAddress)@Nonnull default Proxy getAsProxy()
null Proxy instance. Only uses proxy
host and port.getProxyHost(),
getProxyPort()@Nonnull Proxy getAsProxy(boolean bResolveHostname)
bResolveHostname - 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.getProxyHost(),
getProxyPort()@Nullable default PasswordAuthentication getAsPasswordAuthentication()
PasswordAuthentication instances matching the
credentials contained in this object or null if no
username is present.Copyright © 2016–2019 Philip Helger. All rights reserved.