Interface ProxyConfig


public interface ProxyConfig
  • Method Details

    • getUrl

      String getUrl()
      Returns:
      may be null
    • isEnabled

      boolean isEnabled()
      Returns:
      true if a proxy url is configured and '*' is not set as a no-proxy url
    • isEnabled

      boolean isEnabled(String targetUrl)
      Parameters:
      targetUrl - may be null
      Returns:
      true if a proxy url is configured, '*' is not set as a no-proxy url and the given targetUrl is not set as a no-proxy url, false if the given targetUrl is null, blank or configured as a no-proxy url
      See Also:
    • getUsername

      String getUsername()
      Returns:
      may be null
    • getPassword

      char[] getPassword()
      Returns:
      may be null
    • getNoProxyUrls

      List<String> getNoProxyUrls()
      Returns:
      never null, may be empty
    • isNoProxyUrl

      boolean isNoProxyUrl(String url)
      Returns true if the given url is not null and the domain + port of the given url is configured as a no-proxy URL based on the environment configuration.

      Configured no-proxy URLs are matched exactly and against sub-domains. If a port is configured, only URLs with the same port (or default port) return a true result.

      No-Proxy URL examples
      Configured Given Result
      foo.bar, test.com:8080 https://foo.bar/fhir true
      foo.bar, test.com:8080 https://baz.foo.bar/test true
      foo.bar, test.com:8080 https://test.com:8080/fhir true
      foo.bar, test.com:8080 https://test.com/fhir false
      foo.bar:443 https://foo.bar/fhir true
      Parameters:
      url - may be null
      Returns:
      true if the given url is not null and is configured as a no-proxy url