Package software.amazon.awssdk.utils
Interface ProxyConfigProvider
-
- All Known Implementing Classes:
ProxyEnvironmentVariableConfigProvider,ProxySystemPropertyConfigProvider
@SdkProtectedApi 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 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.Stringhost()Gets the proxy host.Set<String>nonProxyHosts()Gets the set of non-proxy hosts.Optional<String>password()Gets the proxy password if available.intport()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 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
static ProxyConfigProvider fromEnvironmentSettings(String scheme)
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
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.
-
-