org.gersteinlab.tyna.webapp.util
Class HouseKeeper

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.gersteinlab.tyna.webapp.util.HouseKeeper
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class HouseKeeper
extends javax.servlet.http.HttpServlet
implements java.lang.Runnable

        This class performs the housekeeping job for the web application.
        Currently, it does the following:
        . Remove all files in the temp directory. The files are actually
          automatically deleted when the server shuts down. But just in case the
          server is terminated abnormally, or it does not shut down for a long
          time, files older than a day are removed by this class.
        

Version:
1.0 (August 19, 2007)
        Change History:
        1.0     - Initial version
        
Author:
Kevin Yuk-Lap Yip
See Also:
Serialized Form

Constructor Summary
HouseKeeper()
           
 
Method Summary
 void destroy()
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void init(javax.servlet.ServletConfig config)
           
 void run()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
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
 

Constructor Detail

HouseKeeper

public HouseKeeper()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet

run

public void run()
Specified by:
run in interface java.lang.Runnable

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws java.io.IOException,
                     javax.servlet.ServletException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws java.io.IOException,
                      javax.servlet.ServletException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet