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
  • Constructor Details

    • ProxyData

      public ProxyData(@NonNull Proxy proxy)
      Creates a new ProxyData instance without user name or password.
      Parameters:
      proxy - to connect to; must not be Proxy.Type.DIRECT and must have an InetSocketAddress.
    • ProxyData

      public ProxyData(@NonNull Proxy proxy, String proxyUser, char[] proxyPassword)
      Creates a new ProxyData instance.
      Parameters:
      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
  • Method Details

    • getProxy

      @NonNull public Proxy getProxy()
      Obtains the remote InetSocketAddress of 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 null if none
    • getPassword

      public char[] getPassword()
      Obtains a copy of the internally stored password.
      Returns:
      the password or null if none
    • clearPassword

      public void clearPassword()
      Clears the stored password, if any.