Package com.cognite.client.config
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 theCogniteClient. 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)));
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProxyConfig.Builder
-
Constructor Summary
Constructors Constructor Description ProxyConfig()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetPassword()abstract ProxygetProxy()abstract StringgetUsername()static ProxyConfigof(Proxy proxy)abstract ProxyConfig.BuildertoBuilder()StringtoString()ProxyConfigwithPassword(String password)Configures the proxy server authentication password.ProxyConfigwithUsername(String username)Configures the proxy server authentication username.
-
-
-
Method Detail
-
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.
-
-