it.jnrpe.plugins
Class PluginDefinition

java.lang.Object
  extended by it.jnrpe.plugins.PluginDefinition

public final class PluginDefinition
extends Object

This object represent a plugin definition. It is used to describe to JNRPE which parameters a plugin supports

Author:
Massimiliano Ziccardi

Constructor Summary
PluginDefinition(String pluginName, String pluginDescription, Class<? extends IPluginInterface> pluginClazz)
          Initializes the plugin definition specifying the Class object that represent the plugin.
PluginDefinition(String pluginName, String pluginDescription, IPluginInterface pluginInstance)
          Initializes the plugin definition specifying a plugin instance.
 
Method Summary
 PluginDefinition addOption(PluginOption option)
          Adds a new option to the plugin.
 String getDescription()
          Returns the plugin description.
 String getName()
          Returns the plugin name.
 List<PluginOption> getOptions()
          Returns all the plugin options.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginDefinition

public PluginDefinition(String pluginName,
                        String pluginDescription,
                        Class<? extends IPluginInterface> pluginClazz)
Initializes the plugin definition specifying the Class object that represent the plugin. This constructor is used, for example, by JNRPE server where all the plugins are described in an XML file and are loaded with potentially different class loaders.

Parameters:
pluginName - The plugin name
pluginDescription - The plugin description
pluginClazz - The plugin Class object

PluginDefinition

public PluginDefinition(String pluginName,
                        String pluginDescription,
                        IPluginInterface pluginInstance)
Initializes the plugin definition specifying a plugin instance. This is. useful when you embed JNRPE: with this constructor you can pass a pre. inizialized/configured instance.

Parameters:
pluginName - The plugin name
pluginDescription - The plugin description
pluginInstance - The plugin instance
Method Detail

addOption

public PluginDefinition addOption(PluginOption option)
Adds a new option to the plugin.

Parameters:
option - The option
Returns:
this

getName

public String getName()
Returns the plugin name.

Returns:
the plugin name.

getOptions

public List<PluginOption> getOptions()
Returns all the plugin options.

Returns:
a List of all the plugin option

getDescription

public String getDescription()
Returns the plugin description.

Returns:
The plugin description


Copyright © 2014. All Rights Reserved.