private void waitForInitialization(long timeout) {
        LOGGER.entering();
        long time = 0;
        while (!getLauncher().isInitialized() && (time < timeout)) {
            try {
                // SeLion Grid could still be downloading dependencies.. Wait for it.
                Thread.sleep(1000);
                time += 1000;
            } catch (InterruptedException e) {
                throw new IllegalStateException(e.getMessage(), e);
            }
        }

        if (time == timeout) {
            throw new IllegalStateException(String.format("Timed out waiting for %s to initialize.",
                    getLocalServerComponent().getClass().getSimpleName()));
        }
        LOGGER.exiting();
    }
private void waitForInitialization ( long timeout ) { LOGGER . entering ( ) ; long time = 0 ; while ( ! getLauncher ( ) . isInitialized ( ) && ( time < timeout ) ) { try { Thread . sleep ( 1000 ) ; time += 1000 ; } catch ( InterruptedException e ) { throw new IllegalStateException ( e . getMessage ( ) , e ) ; } } if ( time == timeout ) { throw new IllegalStateException ( String . format ( "Timed out waiting for %s to initialize." , getLocalServerComponent ( ) . getClass ( ) . getSimpleName ( ) ) ) ; } LOGGER . exiting ( ) ; }
/*
Waits for the launcher to initialize. This code exists purely to give the launcher more time to download
dependencies. Otherwise, it is not needed since RunnableLauncher#isRunning() _should_ check for isInitialized()
at method entry.