Class ProxyConfig


  • public abstract class ProxyConfig
    extends Object
    Proxy server configuration. This class holds the proxy server configuration used by the CogniteClient. The default configuration is no proxy. You can specify the proxy server to use via configuration of 1) the proxy server and (optionally) 2) the username and password to use for authentication.
     
     ProxyConfig proxyConfig = ProxyConfig.of(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort)));
     
     
    • Constructor Detail

      • ProxyConfig

        public ProxyConfig()
    • Method Detail

      • getProxy

        public abstract Proxy getProxy()
      • getUsername

        @Nullable
        public abstract String getUsername()
      • getPassword

        @Nullable
        public abstract String getPassword()
      • withUsername

        public ProxyConfig withUsername​(String username)
        Configures the proxy server authentication username. The default configuration is no authentication. I.e. no username / password.
        Parameters:
        username - The username for the proxy authentication.
        Returns:
        the proxy configuration object with the username specified.
      • withPassword

        public ProxyConfig withPassword​(String password)
        Configures the proxy server authentication password. The default configuration is no authentication. I.e. no username / password.
        Parameters:
        password - The password for the proxy authentication.
        Returns:
        the proxy configuration object with the username specified.