org.apache.nutch.plugin

## Class Plugin

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

-     public class Plugin
      extends java.lang.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 managemet 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
    Modifier and Type | Field and Description
    --- | ---
    `protected Configuration` | `conf`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Plugin(PluginDescriptor pDescriptor, Configuration conf)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `finalize()`
    `PluginDescriptor` | `getDescriptor()` Returns the plugin descriptor
    `void` | `shutDown()` Shutdown the plugin.
    `void` | `startUp()` Will be invoked until plugin start up.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### conf

          protected Configuration conf

  - ### Constructor Detail

    - #### Plugin

          public Plugin(PluginDescriptor pDescriptor,
                        Configuration conf)

      Constructor

  - ### Method Detail

    - #### 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 java.lang.Throwable

      Overrides:
        `finalize` in class `java.lang.Object`
      Throws:
        `java.lang.Throwable`

Copyright © 2019 The Apache Software Foundation