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.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static 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.String
host()
Gets the proxy host.Set<String>
nonProxyHosts()
Gets the set of non-proxy hosts.Optional<String>
password()
Gets the proxy password if available.int
port()
Gets the proxy port.Optional<String>
userName()
Gets the proxy username if available.
-
-
-
Field Detail
-
HTTPS
static final String HTTPS
Constant representing the HTTPS scheme.- See Also:
- Constant Field Values
-
-
Method Detail
-
fromSystemPropertySettings
static ProxyConfigProvider fromSystemPropertySettings(String scheme)
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
static ProxyConfigProvider fromEnvironmentSettings(String scheme)
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
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.
-
-