132133134135136137138139140141142
Thread shutdownHook = new Thread() { @Override public void run() { loadBalancer.terminate(); } }; Runtime.getRuntime().addShutdownHook(shutdownHook); } }