View Javadoc
1   package com.atlassian.plugin;
2   
3   import com.atlassian.plugin.event.NotificationException;
4   
5   /**
6    * Controls the life-cycle of the plugin system.
7    *
8    * @since 2.2.0
9    */
10  public interface PluginSystemLifecycle {
11      /**
12       * Initialise the plugin system. This <b>must</b> be called before anything else.
13       *
14       * @throws PluginParseException  If parsing the plugins failed.
15       * @throws IllegalStateException if already initialized or already in the process of initialization.
16       * @throws NotificationException If any of the Event Listeners throw an exception on the Framework startup events.
17       */
18      void init() throws PluginParseException, NotificationException;
19  
20      /**
21       * Destroys the plugin manager. This <b>must</b> be called when getting rid of the manager instance and you
22       * plan to create another one. Failure to do so will leave around significant resources including threads
23       * and memory usage and can interfere with a web-application being correctly shutdown.
24       *
25       * @since 2.0.0
26       */
27      void shutdown();
28  
29      /**
30       * Restart all plugins by disabling and enabling them in the order they were loaded (by plugin loader)
31       *
32       * @since 2.3.0
33       */
34      void warmRestart();
35  }