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 Details

    • proxyInfo

      public static HttpClientHandler.ProxyInfo proxyInfo(URI proxyUri)
      Creates an instance of ProxyInfo for a proxy that does not require authentication.
      Parameters:
      proxyUri - the URI 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 - the URI 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

      public URI getProxyUri()
      Returns the URI of the proxy.
      Returns:
      the URI of the proxy.
    • 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.