class JaxWsProxySelector extends ProxySelector {

  @Override
  public List<Proxy> select(URI uri) {
    List<Proxy> list = Lists.newArrayList();

    if (uri == null) {
      throw new IllegalArgumentException("URI can't be null.");
    }

    String scheme = uri.getScheme().toLowerCase();
    
    if (SUPPORTED_SCHEMES.contains(scheme)){
      Proxy proxy = getProxy(scheme, proxyProperties.getProperty(scheme + "." + PROXY_HOST),
          proxyProperties.getProperty(scheme + "." + PROXY_PORT), 
          proxyProperties.getProperty(scheme + "." + PROXY_USER));
      
      if (proxy != null){
        list.add(proxy);
      }
    }
    
    if (scheme.startsWith("http") || "ftp".equals(scheme) || scheme.startsWith("socks")){
      Proxy proxy = getProxy("socks", proxyProperties.getProperty(SOCKS_PROXY_HOST),
          proxyProperties.getProperty(SOCKS_PROXY_PORT), 
          proxyProperties.getProperty(SOCKS_PROXY_USER));
      
      if (proxy != null){
        list.add(proxy);
      }
    }

    if (list.size() > 0) {
      return list;
    }
    return delegateSelect(uri);
  }

  public  JaxWsProxySelector(@Nullable ProxySelector proxySelector, Properties properties);
  public  JaxWsProxySelector(@Nullable ProxySelector proxySelector);

}