001 package com.valhalla.pluginmanager;
002
003 /**
004 * Defines the main plugin interface. This interface MUST be implemented by all
005 * JBother plugins. The plugin MUST have a file called "plugin.properties"
006 * somewhere in the jar, and this file MUST define mainClass to be a class that
007 * implements this interface, or the plugin will not work
008 *
009 * @author Adam Olsen
010 * @version 1.0
011 */
012 public interface Plugin {
013 /**
014 * This method will be called on the mainClass of the plugin at load time.
015 * This method is responsible for initializing the plugin and registering
016 * for different plugin events.
017 *
018 * @return returns true if the plugin loaded successfully, false if not
019 */
020 public boolean init();
021
022 /**
023 * This method will be called on the mainClass of the plugin to unload it.
024 * After this method is called the class should no longer be being used.
025 */
026 public void unload();
027 }