Class ProxyConfig

java.lang.Object
com.cognite.client.config.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 Details

    • ProxyConfig

      public ProxyConfig()
  • Method Details

    • of

      public static ProxyConfig of(Proxy proxy)
    • getProxy

      public abstract Proxy getProxy()
    • getUsername

      @Nullable public abstract String getUsername()
    • getPassword

      @Nullable public abstract String getPassword()
    • toBuilder

      public abstract ProxyConfig.Builder toBuilder()
    • 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.
    • toString

      public final String toString()
      Overrides:
      toString in class Object