Class ConservativeProxySelector

All Implemented Interfaces:

public final class ConservativeProxySelector extends Object implements ProxySelector
A proxy selector that delegates to another selector but only if a repository has no proxy yet. If a proxy has already been assigned to a repository, that is selected.
  • Constructor Details

    • ConservativeProxySelector

      Creates a new selector that delegates to the specified selector.
      selector - The selector to delegate to in case a repository has no proxy yet, must not be null.
  • Method Details

    • 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
      repository - The repository for which to select a proxy, must not be null.
      The selected proxy or null if none.