Package org.apache.nutch.plugin
Class Plugin
java.lang.Object
org.apache.nutch.plugin.Plugin
A nutch-plugin is an container for a set of custom logic that provide
extensions to the nutch core functionality or another plugin that provides an
API for extending. A plugin can provide one or a set of extensions.
Extensions are components that can be dynamically installed as a kind of
listener to extension points. Extension points are a kind of publisher that
provide a API and invoke one or a set of installed extensions.
Each plugin may extend the base
Plugin. Plugin
instances are used as the point of life cycle management of plugin related
functionality.
The Plugin will be started up and shutdown by the nutch plugin
management system.
A possible usecase of the Plugin implementation is to create or
close a database connection.- Author:
- joa23
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlugin(PluginDescriptor pDescriptor, Configuration conf) Overloaded constructor -
Method Summary
-
Field Details
-
conf
-
-
Constructor Details
-
Plugin
Overloaded constructor- Parameters:
pDescriptor- a plugin descriptorconf- a populatedConfiguration
-
-
Method Details
-
startUp
Will be invoked until plugin start up. Since the nutch-plugin system use lazy loading the start up is invoked until the first time a extension is used.- Throws:
PluginRuntimeException- If the startup was without successs.
-
shutDown
Shutdown the plugin. This happens until nutch will be stopped.- Throws:
PluginRuntimeException- if a problems occurs until shutdown the plugin.
-
getDescriptor
Returns the plugin descriptor- Returns:
- PluginDescriptor
-
finalize
-