Package org.forgerock.http.handler
Class HttpClientHandler.ProxyInfo
- java.lang.Object
-
- org.forgerock.http.handler.HttpClientHandler.ProxyInfo
-
- Enclosing class:
- HttpClientHandler
public static final class HttpClientHandler.ProxyInfo extends Object
Encapsulates the details of the proxy if one is required when making outgoing requests.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPassword()
Returns the password to use when authenticating to the proxy.URI
getProxyUri()
Returns theURI
of the proxy.String
getUsername()
Returns the username to use when authenticating to the proxy.boolean
hasCredentials()
Returns true if there is a set of username/password credentials defined.static HttpClientHandler.ProxyInfo
proxyInfo(URI proxyUri)
Creates an instance of ProxyInfo for a proxy that does not require authentication.static HttpClientHandler.ProxyInfo
proxyInfo(URI proxyUri, String username, String password)
Creates an instance of ProxyInfo for a proxy that requires authentication.
-
-
-
Method Detail
-
proxyInfo
public static HttpClientHandler.ProxyInfo proxyInfo(URI proxyUri)
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
public static HttpClientHandler.ProxyInfo proxyInfo(URI proxyUri, String username, String password)
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.
-
getUsername
public String getUsername()
Returns the username to use when authenticating to the proxy.- Returns:
- the username to use when authenticating to the proxy.
-
getPassword
public String 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.
-
-