Interface Plugin
- All Known Subinterfaces:
ResourceHoldingPlugin
- All Known Implementing Classes:
OsgiPlugin
public interface Plugin
Represents single plugin installed in system.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents internal state of plugin in system -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPluginStateListener(PluginStateListener listener) Registers plugin state listener.default booleandefault StringgetKey()getState()default booleanisActive()default booleandefault booleanisInUse()voidremovePluginStateListener(PluginStateListener listener) Unregisters plugin state listener
-
Method Details
-
getKey
- Returns:
- unique plugin key
-
getManifest
PluginManifest getManifest()- Returns:
- plugin manifest
-
isEnabled
default boolean isEnabled()- Returns:
- true if plugin is enabled but not yet activated, false otherwise
-
isActive
default boolean isActive()- Returns:
- true if plugin is activated, otherwise false
-
isInUse
default boolean isInUse()- Returns:
- true if plugin is enabled or activated, false otherwise
-
canBeEnabled
default boolean canBeEnabled()- Returns:
- true if plugin is in state that allows to install it, otherwise false
-
getState
Plugin.PluginState getState()- Returns:
- current plugin state
-
addPluginStateListener
Registers plugin state listener. Listener will be invoked on any change in plugin state- Parameters:
listener- listener to register
-
removePluginStateListener
Unregisters plugin state listener- Parameters:
listener- listener to unregister
-