Class ProxyConfiguration
- java.lang.Object
-
- software.amazon.awssdk.http.urlconnection.ProxyConfiguration
-
- All Implemented Interfaces:
ToCopyableBuilder<ProxyConfiguration.Builder,ProxyConfiguration>
public final class ProxyConfiguration extends Object implements ToCopyableBuilder<ProxyConfiguration.Builder,ProxyConfiguration>
Proxy configuration forUrlConnectionHttpClient
. This class is used to configure an HTTP proxy to be used by theUrlConnectionHttpClient
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ProxyConfiguration.Builder
A builder forProxyConfiguration
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProxyConfiguration.Builder
builder()
Create aProxyConfiguration.Builder
, used to create aProxyConfiguration
.String
host()
Returns the proxy host name either from the configured endpoint or from the "http.proxyHost" system property ifProxyConfiguration.Builder.useSystemPropertyValues(Boolean)
is set to true.Set<String>
nonProxyHosts()
The hosts that the client is allowed to access without going through the proxy.String
password()
The password to use when connecting through a proxy.int
port()
Returns the proxy port either from the configured endpoint or from the "http.proxyPort" system property ifProxyConfiguration.Builder.useSystemPropertyValues(Boolean)
is set to true.String
resolveScheme()
String
scheme()
Returns theURI#scheme
from the configured endpoint.ProxyConfiguration.Builder
toBuilder()
String
toString()
String
username()
The username to use when connecting through a proxy.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
host
public String host()
Returns the proxy host name either from the configured endpoint or from the "http.proxyHost" system property ifProxyConfiguration.Builder.useSystemPropertyValues(Boolean)
is set to true.
-
port
public int port()
Returns the proxy port either from the configured endpoint or from the "http.proxyPort" system property ifProxyConfiguration.Builder.useSystemPropertyValues(Boolean)
is set to true. If no value is found in neither of the above options, the default value of 0 is returned.
-
scheme
public String scheme()
Returns theURI#scheme
from the configured endpoint. Otherwise return null.
-
username
public String username()
The username to use when connecting through a proxy.
-
password
public String password()
The password to use when connecting through a proxy.
-
nonProxyHosts
public Set<String> nonProxyHosts()
The hosts that the client is allowed to access without going through the proxy. If the value is not set on the object, the value represent by "http.nonProxyHosts" system property is returned. If system property is also not set, an unmodifiable empty set is returned.
-
toBuilder
public ProxyConfiguration.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<ProxyConfiguration.Builder,ProxyConfiguration>
-
builder
public static ProxyConfiguration.Builder builder()
Create aProxyConfiguration.Builder
, used to create aProxyConfiguration
.
-
resolveScheme
public String resolveScheme()
-
-