Save This Page
Home » nutch-1.0 » org.apache.nutch » plugin » [javadoc | source]
org.apache.nutch.plugin
public class: Extension [javadoc | source]
java.lang.Object
   org.apache.nutch.plugin.Extension
An Extension is a kind of listener descriptor that will be installed on a concrete ExtensionPoint that acts as kind of Publisher.
Constructor:
 public Extension(PluginDescriptor pDescriptor,
    String pExtensionPoint,
    String pId,
    String pExtensionClass,
    Configuration conf,
    PluginRepository pluginRepository) 
    Parameters:
    pDescriptor - a plugin descriptor
    pExtensionPoint - an extension porin
    pId - an unique id of the plugin
Method from org.apache.nutch.plugin.Extension Summary:
addAttribute,   getAttribute,   getClazz,   getDescriptor,   getExtensionInstance,   getId,   getTargetPoint,   setClazz,   setDescriptor,   setId
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.nutch.plugin.Extension Detail:
 public  void addAttribute(String pKey,
    String pValue) 
    Adds a attribute and is only used until model creation at plugin system start up.
 public String getAttribute(String pKey) 
    Returns a attribute value, that is setuped in the manifest file and is definied by the extension point xml schema.
 public String getClazz() 
    Returns the full class name of the extension point implementation
 public PluginDescriptor getDescriptor() 
    return the plugin descriptor.
 public Object getExtensionInstance() throws PluginRuntimeException 
    Return an instance of the extension implementatio. Before we create a extension instance we startup the plugin if it is not already done. The plugin instance and the extension instance use the same 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.
 public String getId() 
    Return the unique id of the extension.
 public String getTargetPoint() 
    Returns the Id of the extension point, that is implemented by this extension.
 public  void setClazz(String extensionClazz) 
    Sets the Class that implement the concret extension and is only used until model creation at system start up.
 public  void setDescriptor(PluginDescriptor pDescriptor) 
    Sets the plugin descriptor and is only used until model creation at system start up.
 public  void setId(String extensionID) 
    Sets the unique extension Id and is only used until model creation at system start up.