public class ProxyOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST
The default hostname for proxy connect = "localhost"
|
static int |
DEFAULT_PORT
The default port for proxy connect = 3128
3128 is the default port for e.g.
|
static ProxyType |
DEFAULT_TYPE
The default proxy type (HTTP)
|
Constructor and Description |
---|
ProxyOptions()
Default constructor.
|
ProxyOptions(JsonObject json)
Create options from JSON.
|
ProxyOptions(ProxyOptions other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getHost()
Get proxy host.
|
String |
getPassword()
Get proxy password.
|
int |
getPort()
Get proxy port.
|
ProxyType |
getType()
Get proxy type.
|
String |
getUsername()
Get proxy username.
|
ProxyOptions |
setHost(String host)
Set proxy host.
|
ProxyOptions |
setPassword(String password)
Set proxy password.
|
ProxyOptions |
setPort(int port)
Set proxy port.
|
ProxyOptions |
setType(ProxyType type)
Set proxy type.
|
ProxyOptions |
setUsername(String username)
Set proxy username.
|
JsonObject |
toJson()
Convert to JSON
|
public static final ProxyType DEFAULT_TYPE
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public ProxyOptions()
public ProxyOptions(ProxyOptions other)
other
- the options to copypublic ProxyOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public String getHost()
public ProxyOptions setHost(String host)
host
- the proxy host to connect topublic int getPort()
public ProxyOptions setPort(int port)
port
- the proxy port to connect topublic String getUsername()
public ProxyOptions setUsername(String username)
username
- the proxy usernamepublic String getPassword()
public ProxyOptions setPassword(String password)
password
- the proxy passwordpublic ProxyType getType()
ProxyType can be HTTP, SOCKS4 and SOCKS5
public ProxyOptions setType(ProxyType type)
ProxyType can be HTTP, SOCKS4 and SOCKS5
type
- the proxy type to connect toCopyright © 2024 Eclipse. All rights reserved.