org.eclipse.aether.util.repository

## Class JreProxySelector

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

- All Implemented Interfaces:
    ProxySelector

      public final class JreProxySelector
      extends Object
      implements ProxySelector

  A proxy selector that uses the `JRE's global proxy selector`. In combination with the system property `java.net.useSystemProxies`, this proxy selector can be employed to pick up the proxy configuration from the operating system, see Java Networking and Proxies for details. The `JRE's global authenticator` is used to look up credentials for a proxy when needed.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JreProxySelector()` Creates a new proxy selector that delegates to `ProxySelector.getDefault()`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### JreProxySelector

          public JreProxySelector()

      Creates a new proxy selector that delegates to `ProxySelector.getDefault()`.

  - ### Method Detail

    - #### 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.