A plugin instance. All plugins implement this interface.
| 6 | * A plugin instance. All plugins implement this interface. |
| 7 | */ |
| 8 | public interface Plugin { |
| 9 | /** |
| 10 | * Plugin initialization. Called on startup, before {@link #start()}. |
| 11 | * |
| 12 | * @param context Any context the plugin may need for initialization. |
| 13 | */ |
| 14 | void init(@NotNull PluginContext context) throws Exception; |
| 15 | |
| 16 | /** |
| 17 | * Plugin start. Called on startup, after {@link #init(PluginContext)}. |
| 18 | */ |
| 19 | void start() throws Exception; |
| 20 | |
| 21 | /** |
| 22 | * Plugin stop. Called on shutdown. |
| 23 | */ |
| 24 | void stop() throws Exception; |
| 25 | } |