Package software.amazon.awssdk.utils
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProxyConfigProvider
fromEnvironmentSettings
(String scheme) Returns a newProxyConfigProvider
that retrieves proxy configuration from environment variables.static ProxyConfigProvider
fromSystemEnvironmentSettings
(Boolean useSystemPropertyValues, Boolean useEnvironmentVariableValues, String scheme) Returns aProxyConfigProvider
based on the specified settings for using system properties, environment variables, and the scheme.static ProxyConfigProvider
fromSystemPropertySettings
(String scheme) Returns a newProxyConfigProvider
that 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.int
port()
Gets the proxy port.userName()
Gets the proxy username if available.
-
Field Details
-
HTTPS
Constant representing the HTTPS scheme.- See Also:
-
-
Method Details
-
fromSystemPropertySettings
Returns a newProxyConfigProvider
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
Returns a newProxyConfigProvider
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 aProxyConfigProvider
based on the specified settings for using system properties, environment variables, and the scheme.- Parameters:
useSystemPropertyValues
- ABoolean
indicating whether to use system property values.useEnvironmentVariableValues
- ABoolean
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
Gets the proxy username if available.- Returns:
- An optional containing the proxy username, if available.
-
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
Gets the set of non-proxy hosts.- Returns:
- A set containing the non-proxy host names.
-