org.graffiti.managers
Class DefaultAlgorithmManager

java.lang.Object
  extended by org.graffiti.managers.DefaultAlgorithmManager
All Implemented Interfaces:
AlgorithmManager, PluginManagerListener

public class DefaultAlgorithmManager
extends Object
implements AlgorithmManager

Manages the map of available algorithms: key = algorithm class names, value = algorithm

Version:
$Revision: 5767 $

Constructor Summary
DefaultAlgorithmManager()
          Constructs a new algorithm manager.
 
Method Summary
 void addAlgorithm(Algorithm algorithm)
          Adds the given algorithm to the list of algorithms.
 List<Algorithm> getAlgorithms()
          Returns a java.util.List containing all the Algorithm instances the manager contains.
 String getClassName(Algorithm algorithm)
          Returns the class name of the specified algorithm.
 void pluginAdded(GenericPlugin plugin, PluginDescription desc)
          Called by the plugin manager, iff a plugin has been added.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAlgorithmManager

public DefaultAlgorithmManager()
Constructs a new algorithm manager.

Method Detail

getAlgorithms

public List<Algorithm> getAlgorithms()
Description copied from interface: AlgorithmManager
Returns a java.util.List containing all the Algorithm instances the manager contains.

Specified by:
getAlgorithms in interface AlgorithmManager
Returns:
a java.util.List containing all the Algorithm instances the manager contains.

getClassName

public String getClassName(Algorithm algorithm)
Description copied from interface: AlgorithmManager
Returns the class name of the specified algorithm. Using the InstanceLoader an instance of this Algorithm can be created.

Specified by:
getClassName in interface AlgorithmManager
Parameters:
algorithm - the Algorithm of which to get the class name.
Returns:
the class name of the specified algorithm.

addAlgorithm

public void addAlgorithm(Algorithm algorithm)
Description copied from interface: AlgorithmManager
Adds the given algorithm to the list of algorithms.

Specified by:
addAlgorithm in interface AlgorithmManager
Parameters:
algorithm - the algorithm to add to the list.

pluginAdded

public void pluginAdded(GenericPlugin plugin,
                        PluginDescription desc)
Description copied from interface: PluginManagerListener
Called by the plugin manager, iff a plugin has been added.

Specified by:
pluginAdded in interface PluginManagerListener
Parameters:
plugin - the added plugin.
desc - the description of the new plugin.


Generated at 2012-05-30 11:00:14 PM CEST