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
FeatureDescriptor
s in whole plugin.
It is directly extracted by PluginManager.
Activation order:
- Plugin is enabled aka plugin is loaded and ready (specifics depends on plugin type)
- Resources are prepared for plugin (if necessary) (specifics depends on plugin type)
- Plugin is activated with
activate()
method - Plugin
FeatureDescriptor
s are plugged into correspondingFeatureModule
s
Deactivation order:
- Plugin
FeatureDescriptor
s are unplugged from correspondingFeatureModule
s - Plugin is deactivated with
deactivate()
method - Resources reserved for plugin are freed (if necessary) (specifics depends on plugin type)
- Plugin is disabled (specifics depends on plugin type)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Invoked by PluginsManager when plugin is activated.void
Invoked by PluginsManager before plugin is deactivated.Set ofFeatureDescriptor
s returned by this method is plugged into registeredFeatureModule
s.default void
purge()
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 importsFeatureDescriptor
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 ofFeatureDescriptor
s returned by this method is plugged into registeredFeatureModule
s.- Returns:
- Set of
FeatureDescriptor
s provided by plugin
-
purge
default void purge()Invoked by PluginsManager when plugin is request to remove all its data.
-