com.atlassian.plugin.osgi.factory
Class RemotablePluginFactory

java.lang.Object
  extended by com.atlassian.plugin.factories.AbstractPluginFactory
      extended by com.atlassian.plugin.osgi.factory.RemotablePluginFactory
All Implemented Interfaces:
PluginFactory

public final class RemotablePluginFactory
extends AbstractPluginFactory

Plugin loader that starts an OSGi container and loads plugins into it, wrapped as OSGi bundles. Supports

Since:
3.0

Field Summary
 
Fields inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
applications, descriptorParserFactory, log
 
Constructor Summary
RemotablePluginFactory(java.lang.String pluginDescriptorFileName, java.util.Set<Application> applications, OsgiContainerManager osgi, PluginEventManager pluginEventManager)
          Constructor for implementations that want to override the DefaultPluginTransformer with a custom implementation
 
Method Summary
 Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory)
          Creates the plugin
protected  java.io.InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
           
protected  com.google.common.base.Predicate<java.lang.Integer> isValidPluginsVersion()
           
 
Methods inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
canCreate, create, getPluginKeyFromDescriptor, hasDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemotablePluginFactory

public RemotablePluginFactory(java.lang.String pluginDescriptorFileName,
                              java.util.Set<Application> applications,
                              OsgiContainerManager osgi,
                              PluginEventManager pluginEventManager)
Constructor for implementations that want to override the DefaultPluginTransformer with a custom implementation

Method Detail

getDescriptorInputStream

protected java.io.InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
Specified by:
getDescriptorInputStream in class AbstractPluginFactory

isValidPluginsVersion

protected com.google.common.base.Predicate<java.lang.Integer> isValidPluginsVersion()
Specified by:
isValidPluginsVersion in class AbstractPluginFactory

create

public Plugin create(PluginArtifact pluginArtifact,
                     ModuleDescriptorFactory moduleDescriptorFactory)
              throws PluginParseException
Creates the plugin

Parameters:
pluginArtifact - the plugin artifact to deploy
moduleDescriptorFactory - The factory for plugin modules
Returns:
The instantiated and populated plugin
Throws:
PluginParseException - If the descriptor cannot be parsed
java.lang.IllegalArgumentException - If the plugin descriptor isn't found, and the plugin key and bundle version aren't specified in the manifest


Copyright © 2013 Atlassian. All Rights Reserved.