Search in sources :

Example 1 with SparkManager

use of org.jivesoftware.openfire.plugin.spark.SparkManager in project Openfire by igniterealtime.

the class ClientControlPlugin method initializePlugin.

// Plugin Interface
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    // Check if we Enterprise is installed and stop loading this plugin if found
    File pluginDir = new File(JiveGlobals.getHomeDirectory(), "plugins");
    File[] jars = pluginDir.listFiles(new FileFilter() {

        public boolean accept(File pathname) {
            String fileName = pathname.getName().toLowerCase();
            return (fileName.equalsIgnoreCase("enterprise.jar"));
        }
    });
    if (jars.length > 0) {
        // Do not load this plugin since Enterprise is still installed
        System.out.println("Enterprise plugin found. Stopping Client Control Plugin");
        throw new IllegalStateException("This plugin cannot run next to the Enterprise plugin");
    }
    taskEngine = TaskEngine.getInstance();
    sparkManager = new SparkManager(taskEngine);
    sparkManager.start();
    // Create and start the Spark version manager
    sparkVersionManager = new SparkVersionManager();
    sparkVersionManager.start();
    fileTransferFilterManager = new FileTransferFilterManager();
    fileTransferFilterManager.start();
}
Also used : SparkManager(org.jivesoftware.openfire.plugin.spark.SparkManager) SparkVersionManager(org.jivesoftware.openfire.plugin.spark.manager.SparkVersionManager) FileTransferFilterManager(org.jivesoftware.openfire.plugin.spark.manager.FileTransferFilterManager) FileFilter(java.io.FileFilter) File(java.io.File)

Aggregations

File (java.io.File)1 FileFilter (java.io.FileFilter)1 SparkManager (org.jivesoftware.openfire.plugin.spark.SparkManager)1 FileTransferFilterManager (org.jivesoftware.openfire.plugin.spark.manager.FileTransferFilterManager)1 SparkVersionManager (org.jivesoftware.openfire.plugin.spark.manager.SparkVersionManager)1