Class Plugin

java.lang.Object
org.apache.nutch.plugin.Plugin

public class Plugin extends Object
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 Details

  • Constructor Details

  • Method Details

    • startUp

      public void startUp() throws PluginRuntimeException
      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

      public void shutDown() throws PluginRuntimeException
      Shutdown the plugin. This happens until nutch will be stopped.
      Throws:
      PluginRuntimeException - if a problems occurs until shutdown the plugin.
    • getDescriptor

      public PluginDescriptor getDescriptor()
      Returns the plugin descriptor
      Returns:
      PluginDescriptor
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable