Package software.amazon.awssdk.crt.http
Class HttpProxyOptions
java.lang.Object
software.amazon.awssdk.crt.http.HttpProxyOptions
This class provides access to Http proxy configuration options
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumwhat kind of authentication, if any, to use when connecting to a proxy serverstatic enumWhat kind of proxy connection to establish -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHost()intgetPort()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 typevoidSets the proxy host to connect throughvoidsetPort(int port) Sets the proxy port to connect through.voidsetTlsContext(TlsContext tlsContext) Sets the tls context for the proxy connection
-
Constructor Details
-
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 Details
-
setConnectionType
Sets the proxy connection type- Parameters:
connectionType- what kind of connection to establish
-
getConnectionType
- Returns:
- the proxy connection type
-
setHost
Sets the proxy host to connect through- Parameters:
host- proxy to connect through
-
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
Sets the proxy authorization type- Parameters:
authorizationType- what kind of authentication, if any, to use
-
getAuthorizationType
- Returns:
- the proxy authorization type
-
setAuthorizationUsername
Sets the username to use for authorization; only applicable to basic authentication- Parameters:
username- username to use with basic authentication
-
getAuthorizationUsername
- Returns:
- the username to use for authorization
-
setAuthorizationPassword
Sets the password to use for authorization; only applicable to basic authentication- Parameters:
password- password to use with basic authentication
-
getAuthorizationPassword
- Returns:
- the password to use for authorization
-
setTlsContext
Sets the tls context for the proxy connection- Parameters:
tlsContext- tls context for the proxy connection
-
getTlsContext
- Returns:
- the tls context for the proxy connection
-