org.keycloak.connections.httpclient

## Class ProxyMappings

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

-     public class ProxyMappings
      extends Object

  `ProxyMappings` describes an ordered mapping for hostname regex patterns to a `HttpHost` proxy.

  Mappings can be created via `valueOf(String...)` or `valueOf(List)`. For a description of the mapping format see `ProxyMappings.ProxyMapping.valueOf(String)`

  Author:
    Thomas Darimont

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ProxyMappings.ProxyMapping` `ProxyMappings.ProxyMapping` describes a Proxy Mapping with a Hostname `Pattern` that is mapped to a proxy `HttpHost`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyMappings(List<ProxyMappings.ProxyMapping> entries)` Creates a `ProxyMappings` from the provided `Entries`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clearCache()`
    `ProxyMappings.ProxyMapping` | `getProxyFor(String hostname)`
    `boolean` | `isEmpty()`
    `static ProxyMappings` | `valueOf(List<String> proxyMappings)` Creates a new `ProxyMappings` from the provided `List` of proxy mapping strings.
    `static ProxyMappings` | `valueOf(String... proxyMappings)` Creates a new `ProxyMappings` from the provided `String[]` of proxy mapping strings.

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

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

- - ### Constructor Detail

    - #### ProxyMappings

          public ProxyMappings(List<ProxyMappings.ProxyMapping> entries)

      Creates a `ProxyMappings` from the provided `Entries`.
      Parameters:
        `entries` -

  - ### Method Detail

    - #### valueOf

          public static ProxyMappings valueOf(List<String> proxyMappings)

      Creates a new `ProxyMappings` from the provided `List` of proxy mapping strings.

      Parameters:
        `proxyMappings` -

    - #### valueOf

          public static ProxyMappings valueOf(String... proxyMappings)

      Creates a new `ProxyMappings` from the provided `String[]` of proxy mapping strings.
      Parameters:
        `proxyMappings` -
      Returns:
      See Also:
        `valueOf(List)`, `valueOf(String...)`

    - #### isEmpty

          public boolean isEmpty()

    - #### getProxyFor

          public ProxyMappings.ProxyMapping getProxyFor(String hostname)

      Parameters:
        `hostname` -
      Returns:
        the `ProxyMappings.ProxyMapping` associated with the first matching hostname `Pattern` or the `ProxyMappings.ProxyMapping` including null as `HttpHost` if none matches.

    - #### clearCache

          public static void clearCache()

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