public void start ( ) { this . commandWorker . start ( ) ; while ( ! this . commandWorker . isRunning ( ) ) { // wait for the command worker to be ready System . out . println ( "waiting for worker to connect..." ) ; try { Thread . sleep ( 50 ) ; } catch ( final InterruptedException e ) { System . out . println ( "server thread could not wait for worker" ) ; e . printStackTrace ( ) ; } } }
start the server and wait for it to be running