Interface PluginActivator

All Known Implementing Classes:
EventSendingPluginActivator, SimplePluginActivator

public interface PluginActivator
Special interface that must be implemented and exported by all plugins providing any functionality. This interface is only point which can be used to provide FeatureDescriptors in whole plugin. It is directly extracted by PluginManager.

Activation order:

  1. Plugin is enabled aka plugin is loaded and ready (specifics depends on plugin type)
  2. Resources are prepared for plugin (if necessary) (specifics depends on plugin type)
  3. Plugin is activated with activate() method
  4. Plugin FeatureDescriptors are plugged into corresponding FeatureModules

Deactivation order:

  1. Plugin FeatureDescriptors are unplugged from corresponding FeatureModules
  2. Plugin is deactivated with deactivate() method
  3. Resources reserved for plugin are freed (if necessary) (specifics depends on plugin type)
  4. Plugin is disabled (specifics depends on plugin type)

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoked by PluginsManager when plugin is activated.
    void
    Invoked by PluginsManager before plugin is deactivated.
    Set of FeatureDescriptors returned by this method is plugged into registered FeatureModules.
    default void
    Invoked by PluginsManager when plugin is request to remove all its data.
  • Method Details

    • activate

      void activate()
      Invoked by PluginsManager when plugin is activated. Allows plugin to prepare resources and environment for plugin work. It is invoked before manager imports FeatureDescriptor list and plug it into feature modules.
    • deactivate

      void deactivate()
      Invoked by PluginsManager before plugin is deactivated. Allows plugin to clean up all resources and environment. It is invoked after disabling dependant plugins.
    • getFeatureDescriptors

      Set<FeatureDescriptor> getFeatureDescriptors()
      Set of FeatureDescriptors returned by this method is plugged into registered FeatureModules.
      Returns:
      Set of FeatureDescriptors provided by plugin
    • purge

      default void purge()
      Invoked by PluginsManager when plugin is request to remove all its data.