private void handlePlugin(String name, String spec, String[] args, boolean wait) { System.setSecurityManager(new RMISecurityManager()); TransitModel model = getTransitModel(args); boolean waitForCompletion = deployHandler(model, name, spec, args, wait); if (!waitForCompletion) { if (m_plugin instanceof Disposable) { Disposable disposable = (Disposable) m_plugin; disposable.dispose(); } if (model instanceof DefaultTransitModel) { DefaultTransitModel disposable = (DefaultTransitModel) model; disposable.dispose(); } System.exit(0); } }