View Javadoc
1   package com.atlassian.plugin;
2   
3   import com.atlassian.annotations.ExperimentalApi;
4   import com.atlassian.plugin.event.NotificationException;
5   
6   /**
7    * Augments the life-cycle of the plugin system with the ability to split {@link PluginSystemLifecycle#init()} for two phase
8    * startup.
9    *
10   * @since 3.2.0
11   */
12  @ExperimentalApi
13  public interface SplitStartupPluginSystemLifecycle extends PluginSystemLifecycle {
14      /**
15       * Perform the first part of startup.
16       *
17       * This initializes the plugin system, and installs and enables early plugins.
18       *
19       * @throws PluginParseException  If parsing the plugins failed.
20       * @throws IllegalStateException if already initialized or already in the process of initialization.
21       * @throws NotificationException If any of the Event Listeners throw an exception on the Framework startup events.
22       * @see PluginSystemLifecycle#init
23       */
24      void earlyStartup() throws PluginParseException, NotificationException;
25  
26      /**
27       * Perform the second part of startup.
28       *
29       * This installs and enables late plugins, and performs any final validation steps. This may
30       * only be called after {@link #earlyStartup}, and calling both earlyStartup and lateStartup is
31       * equivalent to calling {@link PluginSystemLifecycle#init()}.
32       *
33       * @throws PluginParseException  If parsing the plugins failed.
34       * @throws IllegalStateException if already initialized or already in the process of initialization.
35       * @throws NotificationException If any of the Event Listeners throw an exception on the Framework startup events.
36       * @see PluginSystemLifecycle#init
37       */
38      void lateStartup() throws PluginParseException, NotificationException;
39  }