try {
server.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
if (!new SelfWaiter() {
public boolean done() {
return !server.isRunning();
}
}.waitOrTimeout(timeout)) {
server.log("Unable to shutdown server within " + timeout + "ms");