Package software.amazon.awssdk.crt.http
Class HttpProxyOptions
- java.lang.Object
-
- software.amazon.awssdk.crt.http.HttpProxyOptions
-
public class HttpProxyOptions extends Object
This class provides access to Http proxy configuration options
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpProxyOptions.HttpProxyAuthorizationTypewhat kind of authentication, if any, to use when connecting to a proxy serverstatic classHttpProxyOptions.HttpProxyConnectionTypeWhat kind of proxy connection to establish
-
Constructor Summary
Constructors Constructor Description HttpProxyOptions()Creates a new set of proxy options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorizationPassword()HttpProxyOptions.HttpProxyAuthorizationTypegetAuthorizationType()StringgetAuthorizationUsername()HttpProxyOptions.HttpProxyConnectionTypegetConnectionType()StringgetHost()StringgetNoProxyHosts()intgetPort()TlsContextgetTlsContext()voidsetAuthorizationPassword(String password)Sets the password to use for authorization; only applicable to basic authenticationvoidsetAuthorizationType(HttpProxyOptions.HttpProxyAuthorizationType authorizationType)Sets the proxy authorization typevoidsetAuthorizationUsername(String username)Sets the username to use for authorization; only applicable to basic authenticationvoidsetConnectionType(HttpProxyOptions.HttpProxyConnectionType connectionType)Sets the proxy connection typevoidsetHost(String host)Sets the proxy host to connect throughvoidsetNoProxyHosts(String noProxyHosts)Sets the list of hosts for which not to use a proxy.voidsetPort(int port)Sets the proxy port to connect through.voidsetTlsContext(TlsContext tlsContext)Sets the tls context for the proxy connection
-
-
-
Constructor Detail
-
HttpProxyOptions
public HttpProxyOptions()
Creates a new set of proxy options- Throws:
CrtRuntimeException- If the system is unable to allocate space for a http proxy options instance
-
-
Method Detail
-
setConnectionType
public void setConnectionType(HttpProxyOptions.HttpProxyConnectionType connectionType)
Sets the proxy connection type- Parameters:
connectionType- what kind of connection to establish
-
getConnectionType
public HttpProxyOptions.HttpProxyConnectionType getConnectionType()
- Returns:
- the proxy connection type
-
setHost
public void setHost(String host)
Sets the proxy host to connect through- Parameters:
host- proxy to connect through
-
getHost
public String getHost()
- Returns:
- the proxy host to connect through
-
setPort
public void setPort(int port)
Sets the proxy port to connect through. For 32bit values exceeding Integer.MAX_VALUE use two's complement (i.e. -1 == 0xFFFFFFFF).- Parameters:
port- proxy port to connect through
-
getPort
public int getPort()
- Returns:
- the proxy port to connect through. Note that two's complement is used for 32bit values exceeding Integer.MAX_VALUE (i.e. -1 == 0xFFFFFFFF).
-
setAuthorizationType
public void setAuthorizationType(HttpProxyOptions.HttpProxyAuthorizationType authorizationType)
Sets the proxy authorization type- Parameters:
authorizationType- what kind of authentication, if any, to use
-
getAuthorizationType
public HttpProxyOptions.HttpProxyAuthorizationType getAuthorizationType()
- Returns:
- the proxy authorization type
-
setAuthorizationUsername
public void setAuthorizationUsername(String username)
Sets the username to use for authorization; only applicable to basic authentication- Parameters:
username- username to use with basic authentication
-
getAuthorizationUsername
public String getAuthorizationUsername()
- Returns:
- the username to use for authorization
-
setAuthorizationPassword
public void setAuthorizationPassword(String password)
Sets the password to use for authorization; only applicable to basic authentication- Parameters:
password- password to use with basic authentication
-
getAuthorizationPassword
public String getAuthorizationPassword()
- Returns:
- the password to use for authorization
-
setTlsContext
public void setTlsContext(TlsContext tlsContext)
Sets the tls context for the proxy connection- Parameters:
tlsContext- tls context for the proxy connection
-
getTlsContext
public TlsContext getTlsContext()
- Returns:
- the tls context for the proxy connection
-
getNoProxyHosts
public String getNoProxyHosts()
- Returns:
- the nonProxyHosts setting for the proxy connection.
-
setNoProxyHosts
public void setNoProxyHosts(String noProxyHosts)
Sets the list of hosts for which not to use a proxy. This should be a comma seperated list of domain names, host names, or IP Addresses following the format used by CURL. The only wildcard available is a single "*" character, which matches all hosts, and effectively disables the proxy. IP addresses specified to this option can be provided using CIDR notation: an appended slash and number specifies the number of "network bits" out of the address to use in the comparison.- Parameters:
noProxyHosts- comma seperated list of hosts to skip proxy for.
-
-