Class ProxyHelper


  • public class ProxyHelper
    extends Object
    author: Pascal Knueppel
    created at: 09.12.2019 - 12:17

    this helper can be used with the apache http-client to create an http client that will use a proxy.
    See Also:
    ScimHttpClient
    • Constructor Detail

      • ProxyHelper

        public ProxyHelper()
    • Method Detail

      • isProxySet

        public boolean isProxySet()
        Returns:
        true if a proxy configuration is present, false else
      • getProxyCredentials

        public org.apache.http.client.CredentialsProvider getProxyCredentials()
        Returns:
        a basic credentials provider that will be used for proxy authentication.
      • getProxyConfig

        public org.apache.http.client.config.RequestConfig getProxyConfig()
        will give back a request-config with the proxy settings based on the configuration-poperties
        Returns:
        a new config with the configured proxy or the default-config
      • getProxyAddress

        public String getProxyAddress()
        Returns:
        the currently configured proxy settings as string in the form "localhost:8888"