class XenHypervisor implements HypervisorHost {

    protected Host getMasterHost(Connection conn) throws BadServerResponse, XenAPIException, XmlRpcException {
        Iterator<Pool> poolIterator = Pool.getAll(conn).iterator();
        if (poolIterator.hasNext()) {
            return poolIterator.next().getMaster(conn);
        }
        throw new CloudRuntimeException("Could not find master server for pool.");
    }

}