Class RemotablePluginFactory
java.lang.Object
com.atlassian.plugin.factories.AbstractPluginFactory
com.atlassian.plugin.osgi.factory.RemotablePluginFactory
- All Implemented Interfaces:
com.atlassian.plugin.factories.PluginFactory
public final class RemotablePluginFactory
extends com.atlassian.plugin.factories.AbstractPluginFactory
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<com.atlassian.plugin.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 TypeMethodDescriptioncom.atlassian.plugin.Plugincreate(com.atlassian.plugin.PluginArtifact pluginArtifact, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory) Creates the plugincom.atlassian.plugin.ModuleDescriptor<?>createModule(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element module, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory) protected InputStreamgetDescriptorInputStream(com.atlassian.plugin.PluginArtifact pluginArtifact) Methods inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
canCreate, getPluginKeyFromDescriptor, hasDescriptor
-
Constructor Details
-
RemotablePluginFactory
public RemotablePluginFactory(String pluginDescriptorFileName, Set<com.atlassian.plugin.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 classcom.atlassian.plugin.factories.AbstractPluginFactory
-
isValidPluginsVersion
- Specified by:
isValidPluginsVersionin classcom.atlassian.plugin.factories.AbstractPluginFactory
-
create
public com.atlassian.plugin.Plugin create(com.atlassian.plugin.PluginArtifact pluginArtifact, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory) Creates the plugin- Parameters:
pluginArtifact- the plugin artifact to deploymoduleDescriptorFactory- The factory for plugin modules- Returns:
- The instantiated and populated plugin
- Throws:
com.atlassian.plugin.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 com.atlassian.plugin.ModuleDescriptor<?> createModule(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element module, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory)
-