i3.dragos.core
Class ModuleManager

java.lang.Object
  extended by i3.dragos.core.ModuleManager

public final class ModuleManager
extends java.lang.Object

The ModuleManager is responsible for managing kernel modules.

Author:
Boris Boehlen <boehlen@cs.rwth-aachen.de>

Method Summary
static ModuleManager getInstance()
          Returns the one and only instance of the DRAGOS kernel.
 KernelModule getKernelModule(java.lang.String role)
          Returns the kernel module identified by the role.
 KernelModule loadModule(java.lang.String clazzName)
          Loads a kernel module with the given class name and returns the instance that has been created.
 void shutdown()
          Shutdown the module manager and unload all modules.
 void unloadAllModules()
          Unloads all modules managed by the module manager in the reverse order of their insertion.
 void unloadModule(java.lang.String role)
          Unloads the given module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ModuleManager getInstance()
Returns the one and only instance of the DRAGOS kernel. If the module manager has not been created yet it is created.

Returns:
The one and only instance of the DRAGOS module manager.

shutdown

public void shutdown()
Shutdown the module manager and unload all modules.


getKernelModule

public KernelModule getKernelModule(java.lang.String role)
Returns the kernel module identified by the role.

Parameters:
role - The role of the kernel module
Returns:
the kernel module identified by the role.

loadModule

public KernelModule loadModule(java.lang.String clazzName)
Loads a kernel module with the given class name and returns the instance that has been created. Because kernel modules are crucial for the kernel the database shutdown if it was not possible to load a kernel module.

Parameters:
clazzName - The class of the kernel module.
Returns:
The module loaded by the method.

unloadModule

public void unloadModule(java.lang.String role)
Unloads the given module.

Parameters:
role - The name of the module that should be unloaded.

unloadAllModules

public void unloadAllModules()
Unloads all modules managed by the module manager in the reverse order of their insertion.



Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.