it.jnrpe.utils
Class PluginRepositoryUtil

java.lang.Object
  extended by it.jnrpe.utils.PluginRepositoryUtil

public final class PluginRepositoryUtil
extends Object

An utility class that allows to define the plugin repository in an XML file instead that using Java Code.

Author:
Massimiliano Ziccardi

Constructor Summary
PluginRepositoryUtil()
           
 
Method Summary
static void loadFromXmlPluginPackageDefinitions(PluginRepository repo, ClassLoader cl, InputStream in)
          Loads a full repository definition from an XML file
static PluginDefinition parseXmlPluginDefinition(ClassLoader cl, InputStream in)
          Loads the definition of a single plugin from an XML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginRepositoryUtil

public PluginRepositoryUtil()
Method Detail

loadFromXmlPluginPackageDefinitions

public static void loadFromXmlPluginPackageDefinitions(PluginRepository repo,
                                                       ClassLoader cl,
                                                       InputStream in)
                                                throws PluginConfigurationException
Loads a full repository definition from an XML file

Parameters:
repo - The repository that must be loaded
cl - The classloader to be used to instantiate the plugin classes
in - The stream to the XML file
Throws:
PluginConfigurationException

parseXmlPluginDefinition

public static PluginDefinition parseXmlPluginDefinition(ClassLoader cl,
                                                        InputStream in)
                                                 throws PluginConfigurationException
Loads the definition of a single plugin from an XML file

Parameters:
cl - The classloader to be used to instantiate the plugin class
in - The stream to the XML file
Returns:
The plugin definition
Throws:
PluginConfigurationException


Copyright © 2013. All Rights Reserved.