Class ProxyData

java.lang.Object
org.apache.sshd.client.proxy.ProxyData

public class ProxyData extends Object
An object encapsulating the data needed to connect through a proxy server.
  • Constructor Details

    • ProxyData

      public ProxyData(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(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

    • getAddress

      public InetSocketAddress getAddress()
      Obtains the InetSocketAddress to connect to.
      Returns:
      the InetSocketAddress
    • getType

      public Proxy.Type getType()
      Obtains the Proxy to connect to.
      Returns:
      the Proxy, never null
    • 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.