Package org.objectweb.celtix.plugins

Examples of org.objectweb.celtix.plugins.PluginException


            || (state == PluginState.LOADED && nextState == PluginState.UNLOADED)) {
            LOG.fine("changing state from " + state + " to " + nextState);
            state = nextState;
        } else {
            Message msg = new Message("INVALID_STATE_TRANSITION_EXC", BUNDLE, state, nextState);
            throw new PluginException(msg);
        }
        notifyAll();
    }
View Full Code Here


     * @see org.objectweb.celtix.plugins.PluginManager#registerPlugin(org.objectweb.celtix.plugins.Plugin)
     */
    public synchronized void registerPlugin(Object plugin) throws PluginException {
        PluginInfo info = findPluginInfo(plugin);
        if (info.isRegisteredWith(this)) {
            throw new PluginException(new Message("ALREADY_REGISTERED_EXC", LOG, info.getClassName()));
        } else {
            info.register(this);
        }
    }
View Full Code Here

     * @see org.objectweb.celtix.plugins.PluginManager#unloadPlugin(java.lang.String)
     */
    public synchronized void unloadPlugin(Object plugin) throws PluginException {
        PluginInfo info = findPluginInfo(plugin);
        if (info.isRegistered()) {
            throw new PluginException(new Message("STILL_REGISTERED_EXC", LOG, info.getClassName()));
        } else {
            plugins.remove(plugin);
            info = null;
        }   
    }
View Full Code Here

    public synchronized void unregisterPlugin(Object plugin) throws PluginException {
        PluginInfo info = findPluginInfo(plugin);
        if (info.isRegisteredWith(this)) {
            info.unregister(this);
        } else {
            throw new PluginException(new Message("NOT_REGISTERED_EXC", LOG, info.getClassName()));
        }
    }
View Full Code Here

        // check for circular dependencies

        if (dependent != null) {
            info.setRequiredFor(dependent);
            if (info.isCircularDependency()) {
                throw new PluginException(new Message("CIRCULAR_DEPENDENCY_EXC", LOG, pluginClassName));
            }
        }

        if (null != pluginName) {
            Configuration configuration = getConfiguration();
View Full Code Here

        try {
            Class<?> pluginClass = Class.forName(pluginClassName, true, cl);
            plugin = pluginClass.newInstance();
        } catch (Exception ex) {
            LogUtils.log(LOG, Level.SEVERE, "PLUGIN_LOAD_FAILURE_MSG", ex, pluginClassName);
            throw new PluginException(new Message("LOAD_FAILED_EXC", LOG, pluginClassName), ex);
        }
        return plugin;
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.plugins.PluginException

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.