org.eclipse.aether.util.repository

## Class DefaultProxySelector

- java.lang.Object
- - org.eclipse.aether.util.repository.DefaultProxySelector

- All Implemented Interfaces:
    ProxySelector

      public final class DefaultProxySelector
      extends Object
      implements ProxySelector

  A simple proxy selector that selects the first matching proxy from a list of configured proxies.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultProxySelector()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultProxySelector` | `add(Proxy proxy, String nonProxyHosts)` Adds the specified proxy definition to the selector.
    `Proxy` | `getProxy(RemoteRepository repository)` Selects a proxy for the specified remote repository.

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

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

- - ### Constructor Detail

    - #### DefaultProxySelector

          public DefaultProxySelector()

  - ### Method Detail

    - #### add

          public DefaultProxySelector add(Proxy proxy,
                                 String nonProxyHosts)

      Adds the specified proxy definition to the selector. Proxy definitions are ordered, the first matching proxy for a given repository will be used.
      Parameters:
        `proxy` - The proxy definition to add, must not be `null`.
        `nonProxyHosts` - The list of (case-insensitive) host names to exclude from proxying, may be `null`.
      Returns:
        This proxy selector for chaining, never `null`.

    - #### getProxy

          public Proxy getProxy(RemoteRepository repository)

      Description copied from interface: `ProxySelector`
      Selects a proxy for the specified remote repository.
      Specified by:
        `getProxy` in interface `ProxySelector`
      Parameters:
        `repository` - The repository for which to select a proxy, must not be `null`.
      Returns:
        The selected proxy or `null` if none.

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.