class WebtopNamingSiteUtils {

    public Set<URL> getSiteNodeURLs(Session session) {
        Set<URL> urls = new HashSet<URL>();
        for (String node : getSiteNodes(session)) {
            try {
                URL url = new URL(query.getServerFromID(node));
                urls.add(url);
            } catch (MalformedURLException e) {
                String err = "WebtopNaming returned invalid URL";
                debug.error(err, e);
                throw new IllegalStateException(err, e);
            } catch (ServerEntryNotFoundException e) {
                debug.error("Server not found.", e);
                continue;
            }
        }
        return urls;
    }

    @Inject public  WebtopNamingSiteUtils(@Named(SessionConstants.SESSION_DEBUG) Debug debug, WebtopNamingQuery query);

}