org.keycloak.connections.httpclient

## Class ProxyMappings.ProxyMapping

- java.lang.Object
- - org.keycloak.connections.httpclient.ProxyMappings.ProxyMapping

- Enclosing class:
    ProxyMappings

      public static class ProxyMappings.ProxyMapping
      extends Object

  `ProxyMappings.ProxyMapping` describes a Proxy Mapping with a Hostname `Pattern` that is mapped to a proxy `HttpHost`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `NO_PROXY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyMapping(Pattern hostnamePattern, org.apache.http.HttpHost proxyHost, org.apache.http.auth.UsernamePasswordCredentials proxyCredentials)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Pattern` | `getHostnamePattern()`
    `org.apache.http.auth.UsernamePasswordCredentials` | `getProxyCredentials()`
    `org.apache.http.HttpHost` | `getProxyHost()`
    `boolean` | `matches(String hostname)`
    `String` | `toString()`
    `static ProxyMappings.ProxyMapping` | `valueOf(String mapping)` Parses a mapping string into an `ProxyMappings.ProxyMapping`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NO_PROXY

          public static final String NO_PROXY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ProxyMapping

          public ProxyMapping(Pattern hostnamePattern,
                              org.apache.http.HttpHost proxyHost,
                              org.apache.http.auth.UsernamePasswordCredentials proxyCredentials)

  - ### Method Detail

    - #### getHostnamePattern

          public Pattern getHostnamePattern()

    - #### getProxyHost

          public org.apache.http.HttpHost getProxyHost()

    - #### getProxyCredentials

          public org.apache.http.auth.UsernamePasswordCredentials getProxyCredentials()

    - #### matches

          public boolean matches(String hostname)

    - #### valueOf

          public static ProxyMappings.ProxyMapping valueOf(String mapping)

      Parses a mapping string into an `ProxyMappings.ProxyMapping`.

      A proxy mapping string must have the following format: `hostnameRegex;www-proxy-uri` with semicolon as a delimiter.

      If no proxy should be used for a host pattern then use `NO_PROXY` as www-proxy-uri.

      Examples:

           .*\.(google\.com|googleapis\.com);http://www-proxy.acme.corp.com:8080
           .*\.acme\.corp\.com;NO_PROXY
           .*;http://fallback:8080

      Parameters:
        `mapping` -
      Returns:

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2021 JBoss by Red Hat. All rights reserved.