@Immutable public class SocksProxyConfig extends Object implements IProxyConfig
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SOCKS_PROXY_PORT |
static String |
SYSPROP_SOCKS_PROXY_HOST |
static String |
SYSPROP_SOCKS_PROXY_PORT |
| Constructor and Description |
|---|
SocksProxyConfig(String sHost)
Create a SOCKS proxy config object based on the default port
DEFAULT_SOCKS_PROXY_PORT. |
SocksProxyConfig(String sHost,
int nPort)
Create a SOCKS proxy config object based on the given port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateGlobally()
Activate this proxy configuration.
|
static void |
deactivateGlobally() |
boolean |
equals(Object o) |
Proxy |
getAsProxy() |
String |
getHost() |
int |
getPort() |
String |
getProxyHost() |
String |
getProxyPort() |
int |
hashCode() |
String |
toString() |
public static final String SYSPROP_SOCKS_PROXY_HOST
public static final String SYSPROP_SOCKS_PROXY_PORT
public static final int DEFAULT_SOCKS_PROXY_PORT
public SocksProxyConfig(@Nonnull String sHost)
DEFAULT_SOCKS_PROXY_PORT.sHost - The SOCKS proxy host. May not be null.public SocksProxyConfig(@Nonnull String sHost, @Nonnegative int nPort)
sHost - The SOCKS proxy host. May not be null.nPort - The port to use for communication. Must be ≥ 0.@Nonnegative public int getPort()
@Nullable public String getProxyHost()
null.@Nullable public String getProxyPort()
null.public void activateGlobally()
IProxyConfigactivateGlobally in interface IProxyConfigpublic static void deactivateGlobally()
@Nonnull public Proxy getAsProxy()
getAsProxy in interface IProxyConfigProxy object.
May be null if no adequate object can be created.Copyright © 2016–2019 Philip Helger. All rights reserved.