Class RemotablePluginFactory
java.lang.Object
com.atlassian.plugin.factories.AbstractPluginFactory
com.atlassian.plugin.osgi.factory.RemotablePluginFactory
- All Implemented Interfaces:
PluginFactory
Plugin loader that starts an OSGi container and loads plugins into it, wrapped as OSGi bundles. Supports
- Dynamic loading of module descriptors via OSGi services
- Delayed enabling until the plugin container is active
- XML or Jar manifest configuration
- Since:
- 3.0
-
Field Summary
Fields inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
applications, descriptorParserFactory -
Constructor Summary
ConstructorsConstructorDescriptionRemotablePluginFactory(String pluginDescriptorFileName, Set<Application> applications, OsgiContainerManager osgi, com.atlassian.plugin.event.PluginEventManager pluginEventManager) Constructor for implementations that want to override the DefaultPluginTransformer with a custom implementation -
Method Summary
Modifier and TypeMethodDescriptioncreate(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory) Creates the plugincreateModule(Plugin plugin, Element module, ModuleDescriptorFactory moduleDescriptorFactory) protected InputStreamgetDescriptorInputStream(PluginArtifact pluginArtifact) Methods inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
canCreate, getPluginKeyFromDescriptor, hasDescriptor
-
Constructor Details
-
RemotablePluginFactory
public RemotablePluginFactory(String pluginDescriptorFileName, Set<Application> applications, OsgiContainerManager osgi, com.atlassian.plugin.event.PluginEventManager pluginEventManager) Constructor for implementations that want to override the DefaultPluginTransformer with a custom implementation
-
-
Method Details
-
getDescriptorInputStream
- Specified by:
getDescriptorInputStreamin classAbstractPluginFactory
-
isValidPluginsVersion
- Specified by:
isValidPluginsVersionin classAbstractPluginFactory
-
create
public Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory) Creates the plugin- Parameters:
pluginArtifact- the plugin artifact to deploymoduleDescriptorFactory- The factory for plugin modules- Returns:
- The instantiated and populated plugin
- Throws:
PluginParseException- If the descriptor cannot be parsedIllegalArgumentException- If the plugin descriptor isn't found, and the plugin key and bundle version aren't specified in the manifest
-
createModule
public ModuleDescriptor<?> createModule(Plugin plugin, Element module, ModuleDescriptorFactory moduleDescriptorFactory)
-