com.voytechs.util
Class TestModule

java.lang.Object
  extended by com.voytechs.util.TestModule
All Implemented Interfaces:
Module

public class TestModule
extends java.lang.Object
implements Module

This is a testing module. The purpose of this class is to test the ModuleLoader. This is a dummy test module that just loads and prints out its initialization state. Its included for internal testing.


Field Summary
 
Fields inherited from interface com.voytechs.util.Module
INITIALIZED, MODULE_LOAD_FROM_FILESYSTEM, MODULE_LOAD_FROM_NETWORK, NOT_INITIALIZED
 
Constructor Summary
TestModule()
           
 
Method Summary
 void initOnLoad(java.lang.Object userData)
          Initialization routine for the module.
 void initPostLoad(java.lang.Object userData)
          Initialization routine for the module.
 boolean isInitialized()
          Returns if this module has already went through its initialization process.
static void main(java.lang.String[] args)
          Test function for TestModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestModule

public TestModule()
Parameters:
-
Throws:
Method Detail

initOnLoad

public void initOnLoad(java.lang.Object userData)
Description copied from interface: Module
Initialization routine for the module. This method is called right after this module is loaded by ModuleLoader but before all other modules have been loaded. If there is a dependency on another module, there is no guarrantee that dependency module has bee already loaded.

Specified by:
initOnLoad in interface Module

initPostLoad

public void initPostLoad(java.lang.Object userData)
Description copied from interface: Module
Initialization routine for the module. This method is called after all the modules have been loaded by the ModuleLoader. This method can be used to finalize module initialization especially when there is a dependency on another module. This ensures that the depency module has been loaded before this call.

Specified by:
initPostLoad in interface Module
Parameters:
userData - An object that can be used to help initialize the module.

isInitialized

public boolean isInitialized()
Description copied from interface: Module
Returns if this module has already went through its initialization process. Both initOnLoad() and initPostLoad() must have been handled.

Specified by:
isInitialized in interface Module
Returns:
true if both its initialization routines have been called.

main

public static void main(java.lang.String[] args)
Test function for TestModule

Parameters:
args - command line arguments