be.ac.ulg.montefiore.run.totem.netController.facade
Class NetworkControllerManager

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.netController.facade.NetworkControllerManager

public class NetworkControllerManager
extends java.lang.Object

This class is a singleton and provides a global access point to the network controllers.

Creation date: 23-mars-2005

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Method Summary
 NetworkController addNetworkController(java.lang.String name, java.lang.String className, java.util.HashMap<java.lang.String,java.lang.String> params)
          Adds a new network controller.
 java.util.List<java.lang.Class> getAvailableNetworkControllers()
           
static NetworkControllerManager getInstance()
          Returns the unique instance of NetworkControllerManager.
 java.util.List<ParameterDescriptor> getStartParameters(java.lang.String name)
           
 void removeAllNetworkControllers()
          Removes all the network controllers from the NetworkControllerManager.
 void removeNetworkController(java.lang.String name)
          Removes the network controller name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NetworkControllerManager getInstance()
Returns the unique instance of NetworkControllerManager.

Returns:
The unique instance of NetworkControllerManager.

addNetworkController

public NetworkController addNetworkController(java.lang.String name,
                                              java.lang.String className,
                                              java.util.HashMap<java.lang.String,java.lang.String> params)
                                       throws NetworkControllerAlreadyExistException,
                                              NetworkControllerInitialisationException
Adds a new network controller.

Parameters:
name - The name of the network controller to add.
className - The name of the class of the network controller to add. The corresponding full qualified class name must be given in the preferences.xml file.
params - The parameters to initialise the network controller.
Throws:
NetworkControllerAlreadyExistException - If name is already used.
NetworkControllerInitialisationException - If the class className can't be loaded or if an error occurs during the initialisation of the network controller.

removeNetworkController

public void removeNetworkController(java.lang.String name)
                             throws InvalidNetworkControllerException
Removes the network controller name.

Parameters:
name - The name of the network controller to remove.
Throws:
InvalidNetworkControllerException - If there is no network controller with the name name.

removeAllNetworkControllers

public void removeAllNetworkControllers()
Removes all the network controllers from the NetworkControllerManager.


getAvailableNetworkControllers

public java.util.List<java.lang.Class> getAvailableNetworkControllers()

getStartParameters

public java.util.List<ParameterDescriptor> getStartParameters(java.lang.String name)
                                                       throws InvalidNetworkControllerException
Throws:
InvalidNetworkControllerException


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.