Examples of JasenPlugin


Examples of org.jasen.interfaces.JasenPlugin

                Iterator i = config.getPluginConfigurations().iterator();

                plugins = new Vector(config.getPluginConfigurations().size());

                JasenPlugin plugin = null;
                ProbabilityCalculator pluginCalc = null;
                PluginContainer container = null;
                Properties props = null;
                JasenPluginConfiguration pluginConfig = null;

                while(i.hasNext()) {
                    pluginConfig = (JasenPluginConfiguration)i.next();

                    plugin = (JasenPlugin)Class.forName(pluginConfig.getType(), true, loader).newInstance();

                    logger.debug("Initialising plugin: " + plugin.getClass().getName());

                    // initialise the plugin
                    if(pluginConfig.getProperties() != null) {
                        props = new Properties();
                        props.load(this.getClass().getClassLoader().getResourceAsStream(pluginConfig.getProperties()));
                    }
                    else {
                        props = null;
                    }

                    plugin.init(props);

                    if(pluginConfig.getCalculator() != null) {
                        pluginCalc = (ProbabilityCalculator)Class.forName(pluginConfig.getCalculator(), true, loader).newInstance();
                    }
View Full Code Here

Examples of org.jasen.interfaces.JasenPlugin

     */
    public void destroy() {
        logger.debug("Shutting down jASEN engine");

        if(plugins != null) {
            JasenPlugin plugin = null;
            for (int i = 0; i < plugins.size(); i++) {

                plugin = ((PluginContainer)plugins.get(i)).getPlugin();

                logger.debug("Destroying plugin: " + plugin.getClass().getName());

                try {
                    plugin.destroy();
                }
                catch (JasenException e) {
                    errorHandler.handleException(e);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.