/** * Resets the singleton application instance so that {@link #getApp()} will return <code>null</code> after this method has been called. */ @Override protected void handleImminentExit() { if (plugInManager != null) { plugInManager.stopPlugins(); } if (singleThreadExecutor != null) { singleThreadExecutor.shutdown(); singleThreadExecutor = null; } super.handleImminentExit(); }
/** * Exits the application. <p>The base class implementation calls <code>setShuttingDown(true)</code>, calls * {@link #handleImminentExit()} and disposes the main frame. * <p/> * <p> When this method is overridden, this base class's implementation should always be called last. However, the * preferred way to change the shutdown behaviour is to override the {@link #handleImminentExit()} method. */ public void shutDown() { setShuttingDown(true); handleImminentExit(); getMainFrame().dispose(); System.exit(0); }
@Override public void run() { if (isStartedUp() && !isShuttingDown()) { unexpectedShutdown = true; // fix BEAM-712 (nf 2007.11.02) logger.severe("Unexpectedly shutting down " + getAppName());/*I18N*/ handleImminentExit(); } else { logger.severe("Nominally shutting down " + getAppName());/*I18N*/ } } };