protected void waitUntilRoute(String site_name, boolean present,
                                  long timeout, long interval, JChannel ch) throws Exception {
        RELAY2 relay=ch.getProtocolStack().findProtocol(RELAY2.class);
        if(relay == null)
            throw new IllegalArgumentException("Protocol RELAY2 not found");
        Route route=null;
        long deadline=System.currentTimeMillis() + timeout;
        while(System.currentTimeMillis() < deadline) {
            route=relay.getRoute(site_name);
            if((route != null && present) || (route == null && !present))
                break;
            Util.sleep(interval);
        }
        assert (route != null && present) || (route == null && !present);
    }