Interface ProxyConfigProvider
- All Known Implementing Classes:
ProxyEnvironmentVariableConfigProvider,ProxySystemPropertyConfigProvider
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ProxyConfigProviderfromEnvironmentSettings(String scheme) Returns a newProxyConfigProviderthat retrieves proxy configuration from environment variables.static ProxyConfigProviderfromSystemEnvironmentSettings(Boolean useSystemPropertyValues, Boolean useEnvironmentVariableValues, String scheme) Returns aProxyConfigProviderbased on the specified settings for using system properties, environment variables, and the scheme.static ProxyConfigProviderfromSystemPropertySettings(String scheme) Returns a newProxyConfigProviderthat retrieves proxy configuration from system properties.host()Gets the proxy host.Gets the set of non-proxy hosts.password()Gets the proxy password if available.intport()Gets the proxy port.userName()Gets the proxy username if available.
-
Field Details
-
HTTPS
-
-
Method Details
-
fromSystemPropertySettings
Returns a newProxyConfigProviderthat 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
ProxyConfigProviderfor system property-based proxy configuration.
-
fromEnvironmentSettings
Returns a newProxyConfigProviderthat 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
ProxyConfigProviderfor environment variable-based proxy configuration.
-
fromSystemEnvironmentSettings
static ProxyConfigProvider fromSystemEnvironmentSettings(Boolean useSystemPropertyValues, Boolean useEnvironmentVariableValues, String scheme) Returns aProxyConfigProviderbased on the specified settings for using system properties, environment variables, and the scheme.- Parameters:
useSystemPropertyValues- ABooleanindicating whether to use system property values.useEnvironmentVariableValues- ABooleanindicating whether to use environment variable values.scheme- The URI scheme for which the proxy configuration is needed (e.g., "http" or "https").- Returns:
- A
ProxyConfigProviderbased on the specified settings.
-
port
int port()Gets the proxy port.- Returns:
- The proxy port.
-
userName
-
password
-
host
-
nonProxyHosts
-