Interface ProxyConfiguration.Builder

  • Method Details

    • host

      Set the hostname of the proxy.
      Specified by:
      host in interface CrtProxyConfiguration.Builder
      Parameters:
      host - The proxy host.
      Returns:
      This object for method chaining.
    • port

      Set the port that the proxy expects connections on.
      Specified by:
      port in interface CrtProxyConfiguration.Builder
      Parameters:
      port - The proxy port.
      Returns:
      This object for method chaining.
    • scheme

      The HTTP scheme to use for connecting to the proxy. Valid values are http and https.

      The client defaults to http if none is given.

      Specified by:
      scheme in interface CrtProxyConfiguration.Builder
      Parameters:
      scheme - The proxy scheme.
      Returns:
      This object for method chaining.
    • username

      ProxyConfiguration.Builder username(String username)
      The username to use for basic proxy authentication

      If not set, the client will not use basic authentication

      Specified by:
      username in interface CrtProxyConfiguration.Builder
      Parameters:
      username - The basic authentication username.
      Returns:
      This object for method chaining.
    • password

      ProxyConfiguration.Builder password(String password)
      The password to use for basic proxy authentication

      If not set, the client will not use basic authentication

      Specified by:
      password in interface CrtProxyConfiguration.Builder
      Parameters:
      password - The basic authentication password.
      Returns:
      This object for method chaining.
    • useSystemPropertyValues

      ProxyConfiguration.Builder useSystemPropertyValues(Boolean useSystemPropertyValues)
      The option whether to use system property values from ProxySystemSetting if any of the config options are missing. The value is set to "true" by default which means SDK will automatically use system property values if options are not provided during building the ProxyConfiguration object. To disable this behaviour, set this value to false.
      Specified by:
      useSystemPropertyValues in interface CrtProxyConfiguration.Builder
      Parameters:
      useSystemPropertyValues - The option whether to use system property values
      Returns:
      This object for method chaining.
    • useEnvironmentVariableValues

      ProxyConfiguration.Builder useEnvironmentVariableValues(Boolean useEnvironmentVariableValues)
      Set the option whether to use environment variable values for ProxyEnvironmentSetting if any of the config options are missing. The value is set to "true" by default, enabling the SDK to automatically use environment variable values for proxy configuration options that are not provided during building the ProxyConfiguration object. To disable this behavior, set this value to "false".It is important to note that when this property is set to "true," all proxy settings will exclusively originate from Environment Variable Values, and no partial settings will be obtained from System Property Values.

      Comma-separated host names in the NO_PROXY environment variable indicate multiple hosts to exclude from proxy settings.

      Specified by:
      useEnvironmentVariableValues in interface CrtProxyConfiguration.Builder
      Parameters:
      useEnvironmentVariableValues - The option whether to use environment variable values
      Returns:
      This object for method chaining.
    • nonProxyHosts

      ProxyConfiguration.Builder nonProxyHosts(Set<String> nonProxyHosts)
      Configure the hosts that the client is allowed to access without going through the proxy. Each entry accepts the same forms as the http.nonProxyHosts system property: an exact host name such as example.com, a host name with a leading * wildcard such as *.example.com, a single * matching all hosts, or an IP range in CIDR notation such as 10.0.0.0/8. Both example.com and *.example.com match example.com and its subdomains. Entries must not carry surrounding whitespace; a leading or trailing space is treated as part of the host and prevents matching (for example the space in a comma-space no_proxy=a.com, *.foo.com value).
      Specified by:
      nonProxyHosts in interface CrtProxyConfiguration.Builder
    • addNonProxyHost

      ProxyConfiguration.Builder addNonProxyHost(String nonProxyHost)
      Add a host that the client is allowed to access without going through the proxy. The entry accepts the same forms as the http.nonProxyHosts system property: an exact host name such as example.com, a host name with a leading * wildcard such as *.example.com, a single * matching all hosts, or an IP range in CIDR notation such as 10.0.0.0/8. Both example.com and *.example.com match example.com and its subdomains. The entry must not carry surrounding whitespace; a leading or trailing space is treated as part of the host and prevents matching.
      Specified by:
      addNonProxyHost in interface CrtProxyConfiguration.Builder
    • build

      Description copied from interface: SdkBuilder
      An immutable object that is created from the properties that have been set on the builder.
      Specified by:
      build in interface Buildable
      Specified by:
      build in interface CrtProxyConfiguration.Builder
      Specified by:
      build in interface SdkBuilder<ProxyConfiguration.Builder,ProxyConfiguration>
      Returns:
      an instance of T