Top Description Fields Constructors Methods
io.vertx.core.net

public Class ProxyOptions

extends Object
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
java.util.Objects, io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.json.JsonObject

Proxy options for a net client or a net client.
Author
Alexander Lehmann

Field Summary

Modifier and TypeField and Description
public static final String
DEFAULT_HOST

The default hostname for proxy connect = "localhost"

public static final int
DEFAULT_PORT

The default port for proxy connect = 3128 3128 is the default port for e.g. Squid

public static final ProxyType
DEFAULT_TYPE

The default proxy type (HTTP)

private String
private String
private int
private ProxyType
private String

Constructor Summary

AccessConstructor and Description
public
ProxyOptions()

Default constructor.

public
ProxyOptions(ProxyOptions
the options to copy
other
)

Copy constructor.

public
ProxyOptions(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Create options from JSON.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

proxy hosts
getHost
()

Get proxy host.

public String

Returns:

proxy password
getPassword
()

Get proxy password.

public int

Returns:

proxy port
getPort
()

Get proxy port.

public ProxyType

Returns:

proxy type
getType
()

Get proxy type.

public String

Returns:

proxy username
getUsername
()

Get proxy username.

public ProxyOptions

Returns:

a reference to this, so the API can be used fluently
setHost
(String
the proxy host to connect to
host
)

Set proxy host.

public ProxyOptions

Returns:

a reference to this, so the API can be used fluently
setPassword
(String
the proxy password
password
)

Set proxy password.

public ProxyOptions

Returns:

a reference to this, so the API can be used fluently
setPort
(int
the proxy port to connect to
port
)

Set proxy port.

public ProxyOptions

Returns:

a reference to this, so the API can be used fluently
setType
(ProxyType
the proxy type to connect to
type
)

Set proxy type.

public ProxyOptions

Returns:

a reference to this, so the API can be used fluently
setUsername
(String
the proxy username
username
)

Set proxy username.

public JsonObject

Returns:

the JSON
toJson
()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Convert to JSON

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_HOSTback to summary
public static final String DEFAULT_HOST

The default hostname for proxy connect = "localhost"

DEFAULT_PORTback to summary
public static final int DEFAULT_PORT

The default port for proxy connect = 3128 3128 is the default port for e.g. Squid

DEFAULT_TYPEback to summary
public static final ProxyType DEFAULT_TYPE

The default proxy type (HTTP)

hostback to summary
private String host
passwordback to summary
private String password
portback to summary
private int port
typeback to summary
private ProxyType type
usernameback to summary
private String username

Constructor Detail

ProxyOptionsback to summary
public ProxyOptions()

Default constructor.

ProxyOptionsback to summary
public ProxyOptions(ProxyOptions other)

Copy constructor.

Parameters
other:ProxyOptions

the options to copy

ProxyOptionsback to summary
public ProxyOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create options from JSON.

Parameters
json:JsonObject

the JSON

Method Detail

getHostback to summary
public String getHost()

Get proxy host.

Returns:String

proxy hosts

getPasswordback to summary
public String getPassword()

Get proxy password.

Returns:String

proxy password

getPortback to summary
public int getPort()

Get proxy port.

Returns:int

proxy port

getTypeback to summary
public ProxyType getType()

Get proxy type.

ProxyType can be HTTP, SOCKS4 and SOCKS5

Returns:ProxyType

proxy type

getUsernameback to summary
public String getUsername()

Get proxy username.

Returns:String

proxy username

setHostback to summary
public ProxyOptions setHost(String host)

Set proxy host.

Parameters
host:String

the proxy host to connect to

Returns:ProxyOptions

a reference to this, so the API can be used fluently

setPasswordback to summary
public ProxyOptions setPassword(String password)

Set proxy password.

Parameters
password:String

the proxy password

Returns:ProxyOptions

a reference to this, so the API can be used fluently

setPortback to summary
public ProxyOptions setPort(int port)

Set proxy port.

Parameters
port:int

the proxy port to connect to

Returns:ProxyOptions

a reference to this, so the API can be used fluently

setTypeback to summary
public ProxyOptions setType(ProxyType type)

Set proxy type.

ProxyType can be HTTP, SOCKS4 and SOCKS5

Parameters
type:ProxyType

the proxy type to connect to

Returns:ProxyOptions

a reference to this, so the API can be used fluently

setUsernameback to summary
public ProxyOptions setUsername(String username)

Set proxy username.

Parameters
username:String

the proxy username

Returns:ProxyOptions

a reference to this, so the API can be used fluently

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Convert to JSON

Returns:JsonObject

the JSON