Code example for ProxySelector

Methods: select

0
            logger.debug("> select(uri=" + uri + ")");
        } 
        List<Proxy> result;
        Proxy proxy = proxiesByHostName.get(uri.getHost());
        if (proxy == null) {
            result = initialdefaultProxySelector.select(uri);
        } else { 
            result = Arrays.asList(proxy);
        } 
        if (logger.isDebugEnabled()) { 
            logger.debug("< select(uri=" + uri + ") : " + result);
        } 
        return result;
    } 
     
    public void afterPropertiesSet() throws Exception { 
        initialdefaultProxySelector = ProxySelector.getDefault();
        ProxySelector.setDefault(this);
    } 
     
}