edu.ucsb.nceas.metacat.harvesterClient
Class HarvesterServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by edu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, javax.servlet.Servlet, javax.servlet.ServletConfig

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

HarvesterServlet class allows Harvester to be run as a background process. This eliminates the need to run Harvester in a terminal window. To activate this servlet, uncomment the HarvesterServlet entry in the appropriate 'lib/web.xml.tomcat*' file.

Author:
costa
See Also:
Serialized Form

Constructor Summary
HarvesterServlet()
           
 
Method Summary
 void destroy()
          When the thread is destroyed, sets the Harvester.keepRunning flag to false.
 void init(javax.servlet.ServletConfig config)
          Initializes the servlet.
 void run()
          Runs the Harvester main program in a separate thread.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, 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

HarvesterServlet

public HarvesterServlet()
Method Detail

destroy

public void destroy()
When the thread is destroyed, sets the Harvester.keepRunning flag to false.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the servlet. Reads properties and initializes object fields.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

run

public void run()
Runs the Harvester main program in a separate thread. First sleeps for 30 seconds to give Metacat a chance to fully initialize.

Specified by:
run in interface java.lang.Runnable


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.