class WebtopNamingSiteUtils {

    public Set<String> getSiteNodes(Session session) {
        String siteOrServerID = session.getID().getSessionServerID();
        String siteID;

        if (query.isSite(siteOrServerID)) {
            siteID = siteOrServerID;
        } else {
            // Check for the Servers Site.
            siteID = query.getSiteID(siteOrServerID);

            if (siteID == null) {
                // This server has no site.
                return new HashSet<String>(Arrays.asList(siteOrServerID));
            }
        }

        try {
            return query.getSiteNodes(siteID);
        } catch (Exception e) {
            String err = "Failed to find nodes for Site ID: " + siteOrServerID;
            debug.error(err, e);
            throw new IllegalStateException(err);
        }
    }

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

}