Class HttpProxyConfiguration

    • Method Detail

      • fromSystemProperties

        public static HttpProxyConfiguration fromSystemProperties()
        Deprecated.
        Creates a new ProxyConfiguration using the standard properties, reading from System.getProperties().

        The non-proxy hosts property is a pipe-delimited lists of hosts or domains with a wildcard at the start. For example: "server.example.org|*.example.com".

        The proxy authentication property defines the preference order of authentication methods. By default, the order is HttpClient's default order: NTLM, Digest, Basic. You may need to change this if your server advertises that it supports NTLM and Basic authentication, but you only have a Basic authentication credentials. The format of this property is a comma-separated list of values from the HttpClient AuthPolicy class. For example: "basic,ntlm" will try Basic authentication then NTLM authentication.

        See Also:
        PROXY_HOST_PROPERTY, PROXY_PORT_PROPERTY, PROXY_USERNAME_PROPERTY, PROXY_PASSWORD_PROPERTY, NTLM_DOMAIN_PROPERTY, NON_PROXY_HOSTS_PROPERTY, PROXY_AUTHENTICATION
      • fromProperties

        public static HttpProxyConfiguration fromProperties​(Properties properties)
        Deprecated.
        Creates a new ProxyConfiguration using the standard properties, using the Properties object provided.

        See fromSystemProperties() for a discussion of the properties.

        Parameters:
        properties - the properties to use for reading the proxy information
      • isProxyConfigured

        public boolean isProxyConfigured()
        Deprecated.
        Returns true if a proxy server is configured (i.e. the host is set), otherwise false.
      • shouldProxy

        public boolean shouldProxy​(String destinationHost)
        Deprecated.
        Returns true if the proxy is configured and the host is not in the list of "non-proxy hosts".
        See Also:
        isProxyConfigured()
      • hasBasicAuthentication

        public boolean hasBasicAuthentication()
        Deprecated.
        Returns true if the configuration includes basic authentication details, i.e. a username.
      • hasDigestAuthentication

        public boolean hasDigestAuthentication()
        Deprecated.
        Returns true if the configuration includes digest authentication details, i.e. a username.
      • hasNtlmAuthentication

        public boolean hasNtlmAuthentication()
        Deprecated.
        Returns true if the configuration includes NTLM authentication details, i.e. a domain.
      • getHost

        public String getHost()
        Deprecated.
        Returns the proxy host name, or null if no proxy is defined.
      • getPort

        public int getPort()
        Deprecated.
        Returns the proxy port.
      • getUsername

        public String getUsername()
        Deprecated.
        Returns the proxy username, or null if the username is not set.
      • getPassword

        public String getPassword()
        Deprecated.
        Returns the proxy password, or null if the password is not set.
      • getNtlmDomain

        public String getNtlmDomain()
        Deprecated.
        Returns the NTLM authentication domain of the proxy server.