Package org.jnode.plugin

Examples of org.jnode.plugin.PluginRegistry


        } else {
            String ver = (plugin.getPluginVersion().length() == 0) ?
                    System.getProperty("os.version") : plugin.getPluginVersion();
            try {
                PluginManager mgr = InitialNaming.lookup(PluginManager.NAME);
                PluginRegistry reg = mgr.getRegistry();
                if (reg.getPluginDescriptor(id) == null) {
                    reg.loadPlugin(mgr.getLoaderManager(), new PluginReference(id, new Version(ver)), true);
                }
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
                throw new TestRunnerException(
                        "Cannot load plugin '" + plugin.getPluginId() + "/" + ver + "'", ex);
View Full Code Here


        mgr.getRegistry().loadPlugin(mgr.getLoaderManager(), pluginReference, true); //resolve=true
        out.format(fmt_load, pluginReference.getId(), pluginReference.getVersion());
    }
   
    private void reloadPlugin(PluginReference pluginReference) throws PluginException {
        final PluginRegistry reg = mgr.getRegistry();
        final List<PluginReference> refs = reg.unloadPlugin(pluginReference.getId());
        for (PluginReference ref : refs) {
            if (reg.getPluginDescriptor(ref.getId()) == null) {
                reg.loadPlugin(mgr.getLoaderManager(), ref, true); //resolve=true
            }
        }
        if (reg.getPluginDescriptor(pluginReference.getId()) == null) {
            reg.loadPlugin(mgr.getLoaderManager(), pluginReference, true); //resolve=true
        }
        out.format(fmt_reload, pluginReference.getId(), pluginReference.getVersion());
    }
View Full Code Here

     * @throws PluginException
     * @throws MalformedURLException
     */
    protected PluginRegistry getPluginRegistry() throws PluginException,
        MalformedURLException {
        final PluginRegistry piRegistry;
        final URL[] plugins = getPluginList().getPluginList();
        final URL[] systemPlugins = getSystemPluginList().getPluginList();
        final URL[] all = new URL[systemPlugins.length + plugins.length];
        System.arraycopy(systemPlugins, 0, all, 0, systemPlugins.length);
        System.arraycopy(plugins, 0, all, systemPlugins.length, plugins.length);
View Full Code Here

TOP

Related Classes of org.jnode.plugin.PluginRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.