/** * Terminates the installation process. * * @param exitSuccess if <tt>true</tt>, exits with a <tt>0</tt> exit code, else exits with a <tt>1</tt> exit code * @param reboot if <tt>true</tt> perform a reboot */ protected void terminate(boolean exitSuccess, boolean reboot) { housekeeper.shutDown(exitSuccess ? 0 : 1, reboot); }
public void shutDown(int exitCode, boolean reboot) { // IZPACK-276 // Do the cleanup of the last registered client at the fist time (first in last out) for (int i = cleanupClients.size() - 1; i >= 0; i--) { try { (cleanupClients.get(i)).cleanUp(); } catch (Throwable exception) { // At this point we can not afford to treat exceptions. Cleanup that can not be completed might // unfortunately leave some garbage behind. logger.log(Level.WARNING, exception.getMessage(), exception); } } terminate(exitCode, reboot); }
housekeeper.shutDown(1);
@Override public void run() { if (langCode == null) { try { installerContainer.getComponent(LanguageDialog.class).initLangPack(); } catch (Exception ex) { logger.severe("The language pack couldn't be initialized."); } } else { installerContainer.getComponent(LanguageDialog.class).propagateLocale(langCode); } if (!installerContainer.getComponent(RequirementsChecker.class).check()) { logger.info("Not all installer requirements are fulfilled."); installerContainer.getComponent(Housekeeper.class).shutDown(-1); } } });
housekeeper.shutDown(0);
housekeeper.shutDown(0, reboot);
housekeeper.shutDown(success ? 0 : 1, reboot);
housekeeper.shutDown(4);
installerContainer.getComponent(Housekeeper.class).shutDown(-1);