net.sourceforge.fluxion.pussycat.util
Class PluginManager

java.lang.Object
  extended by net.sourceforge.fluxion.pussycat.util.PluginManager

public class PluginManager
extends java.lang.Object

Class to manage any plugins available - modified for use in the ComparaGRID project

Author:
Rob Davey

Constructor Summary
PluginManager()
          Default constructor for the PluginManager object
PluginManager(java.lang.String path)
          Constructs a new PluginManager with respect to a given path of plugins
 
Method Summary
 java.lang.String getMainClass(JarPlugin jp)
          Gets the main class of a JarPlugin
 void getMethods(JarPlugin jp)
          Gets all the methods held in the main class of the JarPlugin
 java.lang.Object getObject(JarPlugin jp)
          Instantiates a JarPlugin as an Object
 java.util.Set<JarPlugin> getPlugins()
          Returns all found JarPlugins
 java.util.ArrayList getPluginsNamesAsList()
          Returns the names of all found JarPlugins as an ArrayList
 void runSelectedPlugin(java.net.URL url, java.lang.String method, java.lang.String[] newArgs)
          Invokes the selected plugin's main class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginManager

public PluginManager()
Default constructor for the PluginManager object


PluginManager

public PluginManager(java.lang.String path)
Constructs a new PluginManager with respect to a given path of plugins

Parameters:
path - Description of the Parameter
Method Detail

getPluginsNamesAsList

public java.util.ArrayList getPluginsNamesAsList()
Returns the names of all found JarPlugins as an ArrayList

Returns:
The pluginsNamesAsList value

getPlugins

public java.util.Set<JarPlugin> getPlugins()
Returns all found JarPlugins

Returns:
The plugins value

getMethods

public void getMethods(JarPlugin jp)
Gets all the methods held in the main class of the JarPlugin

Parameters:
jp - Description of the Parameter

getMainClass

public java.lang.String getMainClass(JarPlugin jp)
Gets the main class of a JarPlugin

Parameters:
jp - Description of the Parameter
Returns:
The mainClass value

getObject

public java.lang.Object getObject(JarPlugin jp)
                           throws java.lang.ClassNotFoundException,
                                  java.lang.InstantiationException,
                                  java.lang.IllegalAccessException
Instantiates a JarPlugin as an Object

Parameters:
jp - Description of the Parameter
Returns:
The object value
Throws:
java.lang.ClassNotFoundException - Description of the Exception
java.lang.InstantiationException - Description of the Exception
java.lang.IllegalAccessException - Description of the Exception

runSelectedPlugin

public void runSelectedPlugin(java.net.URL url,
                              java.lang.String method,
                              java.lang.String[] newArgs)
Invokes the selected plugin's main class

Parameters:
url - Description of the Parameter
method - Description of the Parameter
newArgs - Description of the Parameter


Copyright © 2010. All Rights Reserved.