public class ProxyData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.net.Proxy |
proxy |
private char[] |
proxyPassword |
private java.lang.String |
proxyUser |
Constructor and Description |
---|
ProxyData(java.net.Proxy proxy)
Creates a new
ProxyData instance without user name or password. |
ProxyData(java.net.Proxy proxy,
java.lang.String proxyUser,
char[] proxyPassword)
Creates a new
ProxyData instance. |
Modifier and Type | Method and Description |
---|---|
void |
clearPassword()
Clears the stored password, if any.
|
char[] |
getPassword()
Obtains a copy of the internally stored password.
|
java.net.Proxy |
getProxy()
Obtains the remote
InetSocketAddress of the proxy to connect to. |
java.lang.String |
getUser()
Obtains the user to log in at the proxy with.
|
@NonNull private final java.net.Proxy proxy
private final java.lang.String proxyUser
private final char[] proxyPassword
public ProxyData(@NonNull java.net.Proxy proxy)
ProxyData
instance without user name or password.proxy
- to connect to; must not be Proxy.Type.DIRECT
and must have an InetSocketAddress
.public ProxyData(@NonNull java.net.Proxy proxy, java.lang.String proxyUser, char[] proxyPassword)
ProxyData
instance.proxy
- to connect to; must not be Proxy.Type.DIRECT
and must have an InetSocketAddress
.proxyUser
- to use for log-in to the proxy, may be null
proxyPassword
- to use for log-in to the proxy, may be null
@NonNull public java.net.Proxy getProxy()
InetSocketAddress
of the proxy to connect to.public java.lang.String getUser()
null
if nonepublic char[] getPassword()
null
if nonepublic void clearPassword()