Class ProxySettings


  • public class ProxySettings
    extends Object
    This class represents the settings for a proxy server, including the host, port, username, and password. It can be used to configure a proxy server connection for session.
    • Constructor Detail

      • ProxySettings

        public ProxySettings​(ProxySettings.Type type,
                             String host,
                             int port,
                             String username,
                             String password)
        Constructs a ProxySettings object with the specified proxy host, port, username, and password.
        Parameters:
        type - the proxy type see ProxySettings.Type enum.
        host - the hostname or IP address of the proxy server
        port - the port number on which the proxy server is listening
        username - the username for authentication with the proxy server (can be "" if no authentication is required)
        password - the password for authentication with the proxy server (can be "" if no authentication is required)
    • Method Detail

      • getHost

        public String getHost()
        Returns the proxy host.
        Returns:
        the hostname or IP address of the proxy server
      • getPort

        public int getPort()
        Returns the proxy port.
        Returns:
        the port number on which the proxy server is listening
      • getUsername

        public String getUsername()
        Returns the proxy username.
        Returns:
        the username for authentication with the proxy server, or null if no authentication is required
      • getPassword

        public String getPassword()
        Returns the proxy password.
        Returns:
        the password for authentication with the proxy server, or null if no authentication is required