it.jnrpe.plugins
Class PluginDefinition

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

public 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 sName, String sDescription, Class<? extends IPluginInterface> pluginClass)
          Initializes the plugin definition specifying the Class object that represent the plugin.
PluginDefinition(String sName, String sDescription, IPluginInterface pluginInterface)
          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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginDefinition

public PluginDefinition(String sName,
                        String sDescription,
                        Class<? extends IPluginInterface> pluginClass)
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:
sName - The plugin name
sDescription - The plugin description
pluginClass - The plugin Class object

PluginDefinition

public PluginDefinition(String sName,
                        String sDescription,
                        IPluginInterface pluginInterface)
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:
sName - The plugin name
sDescription - The plugin description
pluginInterface - 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:

getOptions

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

Returns:

getDescription

public String getDescription()
Returns the plugin description

Returns:


Copyright © 2011. All Rights Reserved.