public class PluginRepository extends Object
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
PluginRepository(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
finalize() |
static PluginRepository |
get(org.apache.hadoop.conf.Configuration conf) |
Class |
getCachedClass(PluginDescriptor pDescriptor,
String className) |
ExtensionPoint |
getExtensionPoint(String pXpId)
Returns a extension point indentified by a extension point id.
|
Object[] |
getOrderedPlugins(Class<?> clazz,
String xPointId,
String orderProperty)
Get ordered list of plugins.
|
PluginDescriptor |
getPluginDescriptor(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(String[] args)
Loads all necessary dependencies for a selected plugin, and then runs one
of the classes' main() method.
|
public PluginRepository(org.apache.hadoop.conf.Configuration conf) throws RuntimeException
PluginRuntimeException
RuntimeException
Object.Object()
public static PluginRepository get(org.apache.hadoop.conf.Configuration conf)
public PluginDescriptor[] getPluginDescriptors()
public PluginDescriptor getPluginDescriptor(String pPluginId)
pPluginId
- public ExtensionPoint getExtensionPoint(String pXpId)
pXpId
- public Plugin getPluginInstance(PluginDescriptor pDescriptor) throws PluginRuntimeException
pDescriptor
- PluginRuntimeException
public void finalize() throws Throwable
public Class getCachedClass(PluginDescriptor pDescriptor, String className) throws ClassNotFoundException
ClassNotFoundException
public Object[] getOrderedPlugins(Class<?> clazz, String xPointId, String orderProperty)
clazz
- interface class implemented by required pluginsxPointId
- extension point id of required pluginsorderProperty
- property name defining plugin orderpublic static void main(String[] args) throws 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.Exception
Copyright © 2014 The Apache Software Foundation