net.wgen.op.system
Class OpModuleInitializerServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended bynet.wgen.op.system.OpModuleInitializerServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class OpModuleInitializerServlet
extends javax.servlet.GenericServlet

Version:
$Id: OpModuleInitializerServlet.html,v 1.2 2007/01/28 04:09:37 paulfeuer Exp $
Author:
Paul Feuer, Wireless Generation, Inc.
See Also:
Serialized Form

Field Summary
private static org.apache.log4j.Logger LOG
           
static java.lang.String MODULE_CLASS_PROPERTY
           
static java.lang.String MODULE_FILE_EXTENSION
           
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
OpModuleInitializerServlet()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
           
private static OpModule initModuleClass(java.io.File moduleFile, java.util.Properties p)
          Finds the class property MODULE_CLASS_PROPERTY and tries to instantiate an instance.
static void lookForModulesInDirectory(java.io.File dir)
           
private static java.util.Properties readProperties(java.io.File wgAppFile)
           
 void service(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

MODULE_FILE_EXTENSION

public static final java.lang.String MODULE_FILE_EXTENSION
See Also:
Constant Field Values

MODULE_CLASS_PROPERTY

public static final java.lang.String MODULE_CLASS_PROPERTY
See Also:
Constant Field Values
Constructor Detail

OpModuleInitializerServlet

public OpModuleInitializerServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)

service

public void service(javax.servlet.ServletRequest request,
                    javax.servlet.ServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

lookForModulesInDirectory

public static void lookForModulesInDirectory(java.io.File dir)

readProperties

private static java.util.Properties readProperties(java.io.File wgAppFile)
Parameters:
wgAppFile -
Returns:
the properties from the file

initModuleClass

private static OpModule initModuleClass(java.io.File moduleFile,
                                        java.util.Properties p)
Finds the class property MODULE_CLASS_PROPERTY and tries to instantiate an instance.

Parameters:
moduleFile -
p -
Returns:
the application instance or null, if it could not be made