Interface ProxyConfigProvider

All Known Implementing Classes:
ProxyEnvironmentVariableConfigProvider, ProxySystemPropertyConfigProvider

public interface ProxyConfigProvider
Interface for providing proxy configuration settings. Implementations of this interface can retrieve proxy configuration from various sources such as system properties and environment variables.
  • Field Details

  • Method Details

    • fromSystemPropertySettings

      static ProxyConfigProvider fromSystemPropertySettings(String scheme)
      Returns a new ProxyConfigProvider that retrieves proxy configuration from system properties.
      Parameters:
      scheme - The URI scheme for which the proxy configuration is needed (e.g., "http" or "https").
      Returns:
      A ProxyConfigProvider for system property-based proxy configuration.
    • fromEnvironmentSettings

      static ProxyConfigProvider fromEnvironmentSettings(String scheme)
      Returns a new ProxyConfigProvider that retrieves proxy configuration from environment variables.
      Parameters:
      scheme - The URI scheme for which the proxy configuration is needed (e.g., "http" or "https").
      Returns:
      A ProxyConfigProvider for environment variable-based proxy configuration.
    • fromSystemEnvironmentSettings

      static ProxyConfigProvider fromSystemEnvironmentSettings(Boolean useSystemPropertyValues, Boolean useEnvironmentVariableValues, String scheme)
      Returns a ProxyConfigProvider based on the specified settings for using system properties, environment variables, and the scheme.
      Parameters:
      useSystemPropertyValues - A Boolean indicating whether to use system property values.
      useEnvironmentVariableValues - A Boolean indicating whether to use environment variable values.
      scheme - The URI scheme for which the proxy configuration is needed (e.g., "http" or "https").
      Returns:
      A ProxyConfigProvider based on the specified settings.
    • port

      int port()
      Gets the proxy port.
      Returns:
      The proxy port.
    • userName

      Optional<String> userName()
      Gets the proxy username if available.
      Returns:
      An optional containing the proxy username, if available.
    • password

      Optional<String> password()
      Gets the proxy password if available.
      Returns:
      An optional containing the proxy password, if available.
    • host

      String host()
      Gets the proxy host.
      Returns:
      The proxy host.
    • nonProxyHosts

      Set<String> nonProxyHosts()
      Gets the set of non-proxy hosts.
      Returns:
      A set containing the non-proxy host names.