Package org.eclipse.jgit.transport.sshd
Class ProxyData
- java.lang.Object
-
- org.eclipse.jgit.transport.sshd.ProxyData
-
public class ProxyData extends Object
A DTO encapsulating the data needed to connect through a proxy server.- Since:
- 5.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPassword()Clears the stored password, if any.char[]getPassword()Obtains a copy of the internally stored password.ProxygetProxy()Obtains the remoteInetSocketAddressof the proxy to connect to.StringgetUser()Obtains the user to log in at the proxy with.
-
-
-
Constructor Detail
-
ProxyData
public ProxyData(@NonNull Proxy proxy)
Creates a newProxyDatainstance without user name or password.- Parameters:
proxy- to connect to; must not beProxy.Type.DIRECTand must have anInetSocketAddress.
-
ProxyData
public ProxyData(@NonNull Proxy proxy, String proxyUser, char[] proxyPassword)
Creates a newProxyDatainstance.- Parameters:
proxy- to connect to; must not beProxy.Type.DIRECTand must have anInetSocketAddress.proxyUser- to use for log-in to the proxy, may benullproxyPassword- to use for log-in to the proxy, may benull
-
-
Method Detail
-
getProxy
@NonNull public Proxy getProxy()
Obtains the remoteInetSocketAddressof the proxy to connect to.- Returns:
- the remote address of the proxy
-
getUser
public String getUser()
Obtains the user to log in at the proxy with.- Returns:
- the user name, or
nullif none
-
getPassword
public char[] getPassword()
Obtains a copy of the internally stored password.- Returns:
- the password or
nullif none
-
clearPassword
public void clearPassword()
Clears the stored password, if any.
-
-