public class Extension extends Object
Extension
is a kind of listener descriptor that will be
installed on a concrete ExtensionPoint
that acts as kind of
Publisher.Constructor and Description |
---|
Extension(PluginDescriptor pDescriptor,
String pExtensionPoint,
String pId,
String pExtensionClass,
org.apache.hadoop.conf.Configuration conf,
PluginRepository pluginRepository) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String pKey,
String pValue)
Adds a attribute and is only used until model creation at plugin system
start up.
|
String |
getAttribute(String pKey)
Returns a attribute value, that is setuped in the manifest file and is
definied by the extension point xml schema.
|
String |
getClazz()
Returns the full class name of the extension point implementation
|
PluginDescriptor |
getDescriptor()
return the plugin descriptor.
|
Object |
getExtensionInstance()
Return an instance of the extension implementatio.
|
String |
getId()
Return the unique id of the extension.
|
String |
getTargetPoint()
Returns the Id of the extension point, that is implemented by this
extension.
|
void |
setClazz(String extensionClazz)
Sets the Class that implement the concret extension and is only used until
model creation at system start up.
|
void |
setDescriptor(PluginDescriptor pDescriptor)
Sets the plugin descriptor and is only used until model creation at system
start up.
|
void |
setId(String extensionID)
Sets the unique extension Id and is only used until model creation at
system start up.
|
public Extension(PluginDescriptor pDescriptor, String pExtensionPoint, String pId, String pExtensionClass, org.apache.hadoop.conf.Configuration conf, PluginRepository pluginRepository)
pDescriptor
- a plugin descriptorpExtensionPoint
- an extension porinpId
- an unique id of the pluginpublic String getAttribute(String pKey)
pKey
- a keypublic String getClazz()
public String getId()
public void addAttribute(String pKey, String pValue)
pKey
- a keypValue
- a valuepublic void setClazz(String extensionClazz)
extensionClazz
- The extensionClasname to setpublic void setId(String extensionID)
extensionID
- The extensionID to setpublic String getTargetPoint()
public Object getExtensionInstance() throws PluginRuntimeException
PluginClassLoader
. Each Plugin use its own classloader. The
PluginClassLoader knows only own Plugin runtime libraries setuped
in the plugin manifest file and exported libraries of the depenedend
plugins.PluginRuntimeException
public PluginDescriptor getDescriptor()
public void setDescriptor(PluginDescriptor pDescriptor)
pDescriptor
- Copyright © 2014 The Apache Software Foundation