Top Description Fields Constructors Methods
org.eclipse.jgit.transport.sshd

public Class ProxyData

extends Object
Class Inheritance
Imports
java.net.InetSocketAddress, .Proxy, java.util.Arrays, org.eclipse.jgit.annotations.NonNull

A DTO encapsulating the data needed to connect through a proxy server.
Since
5.2

Field Summary

Modifier and TypeField and Description
private final Proxy
private final char[]
private final String

Constructor Summary

AccessConstructor and Description
public
ProxyData(Proxy
to connect to; must not be java.net.Proxy.Type#DIRECT and must have an InetSocketAddress.
proxy
)

Creates a new ProxyData instance without user name or password.

public
ProxyData(Proxy
to connect to; must not be java.net.Proxy.Type#DIRECT and must have an InetSocketAddress.
proxy
,
String
to use for log-in to the proxy, may be null
proxyUser
,
char[]
to use for log-in to the proxy, may be null
proxyPassword
)

Creates a new ProxyData instance.

Method Summary

Modifier and TypeMethod and Description
public void
clearPassword()

Clears the stored password, if any.

public char[]

Returns:

the password or null if none
getPassword
()

Obtains a copy of the internally stored password.

public Proxy

Returns:

the remote address of the proxy
getProxy
()

Obtains the remote InetSocketAddress of the proxy to connect to.

public String

Returns:

the user name, or null if none
getUser
()

Obtains the user to log in at the proxy with.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

proxyback to summary
private final Proxy proxy
Annotations
@NonNull
proxyPasswordback to summary
private final char[] proxyPassword
proxyUserback to summary
private final String proxyUser

Constructor Detail

ProxyDataback to summary
public ProxyData(Proxy proxy)

Creates a new ProxyData instance without user name or password.

Parameters
proxy:Proxy

to connect to; must not be java.net.Proxy.Type#DIRECT and must have an InetSocketAddress.

ProxyDataback to summary
public ProxyData(Proxy proxy, String proxyUser, char[] proxyPassword)

Creates a new ProxyData instance.

Parameters
proxy:Proxy

to connect to; must not be java.net.Proxy.Type#DIRECT and must have an InetSocketAddress.

proxyUser:String

to use for log-in to the proxy, may be null

proxyPassword:char[]

to use for log-in to the proxy, may be null

Method Detail

clearPasswordback to summary
public void clearPassword()

Clears the stored password, if any.

getPasswordback to summary
public char[] getPassword()

Obtains a copy of the internally stored password.

Returns:char[]

the password or null if none

getProxyback to summary
public Proxy getProxy()

Obtains the remote InetSocketAddress of the proxy to connect to.

Returns:Proxy

the remote address of the proxy

Annotations
@NonNull
getUserback to summary
public String getUser()

Obtains the user to log in at the proxy with.

Returns:String

the user name, or null if none