public class PluginRepository
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
PluginRepository(Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
finalize() |
static PluginRepository |
get(Configuration conf) |
java.lang.Class |
getCachedClass(PluginDescriptor pDescriptor,
java.lang.String className) |
ExtensionPoint |
getExtensionPoint(java.lang.String pXpId)
Returns a extension point indentified by a extension point id.
|
java.lang.Object[] |
getOrderedPlugins(java.lang.Class<?> clazz,
java.lang.String xPointId,
java.lang.String orderProperty)
Get ordered list of plugins.
|
PluginDescriptor |
getPluginDescriptor(java.lang.String pPluginId)
Returns the descriptor of one plugin identified by a plugin id.
|
PluginDescriptor[] |
getPluginDescriptors()
Returns all registed plugin descriptors.
|
Plugin |
getPluginInstance(PluginDescriptor pDescriptor)
Returns a instance of a plugin.
|
static void |
main(java.lang.String[] args)
Loads all necessary dependencies for a selected plugin, and then runs one
of the classes' main() method.
|
public PluginRepository(Configuration conf) throws java.lang.RuntimeException
java.lang.RuntimeException
Object.Object()
public static PluginRepository get(Configuration conf)
public PluginDescriptor[] getPluginDescriptors()
public PluginDescriptor getPluginDescriptor(java.lang.String pPluginId)
pPluginId
- public ExtensionPoint getExtensionPoint(java.lang.String pXpId)
pXpId
- public Plugin getPluginInstance(PluginDescriptor pDescriptor) throws PluginRuntimeException
pDescriptor
- PluginRuntimeException
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.Class getCachedClass(PluginDescriptor pDescriptor, java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.Object[] getOrderedPlugins(java.lang.Class<?> clazz, java.lang.String xPointId, java.lang.String orderProperty)
clazz
- interface class implemented by required pluginsxPointId
- extension point id of required pluginsorderProperty
- property name defining plugin orderpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- plugin ID (needs to be activated in the configuration), and the
class name. The rest of arguments is passed to the main method of
the selected class.java.lang.Exception
Copyright © 2018 The Apache Software Foundation