Package org.forgerock.http.handler
Class HttpClientHandler.ProxyInfo
java.lang.Object
org.forgerock.http.handler.HttpClientHandler.ProxyInfo
- Enclosing class:
- HttpClientHandler
Encapsulates the details of the proxy if one is required when making outgoing requests.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the password to use when authenticating to the proxy.Returns theURI
of the proxy.Returns the username to use when authenticating to the proxy.boolean
Returns true if there is a set of username/password credentials defined.static HttpClientHandler.ProxyInfo
Creates an instance of ProxyInfo for a proxy that does not require authentication.static HttpClientHandler.ProxyInfo
Creates an instance of ProxyInfo for a proxy that requires authentication.
-
Method Details
-
proxyInfo
Creates an instance of ProxyInfo for a proxy that does not require authentication.- Parameters:
proxyUri
- theURI
of the proxy, only the scheme, host and port are used.- Returns:
- an instance of ProxyInfo for a proxy that does not require authentication.
-
proxyInfo
Creates an instance of ProxyInfo for a proxy that requires authentication.- Parameters:
proxyUri
- theURI
of the proxy, only the scheme, host and port are used.username
- the username to use when authenticating to the proxy.password
- the password to use when authenticating to the proxy.- Returns:
- an instance of ProxyInfo for a proxy that requires authentication.
-
getProxyUri
Returns theURI
of the proxy.- Returns:
- the URI of the proxy.
-
getUsername
Returns the username to use when authenticating to the proxy.- Returns:
- the username to use when authenticating to the proxy.
-
getPassword
Returns the password to use when authenticating to the proxy.- Returns:
- the password to use when authenticating to the proxy.
-
hasCredentials
public boolean hasCredentials()Returns true if there is a set of username/password credentials defined.- Returns:
- true if there is a set of username/password credentials defined.
-