edu.ucsb.nceas.metacat.harvesterClient
Class HarvesterServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byedu.ucsb.nceas.metacat.harvesterClient.HarvesterServlet
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable, 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()
          Stops the Harvester thread when the servlet shuts down.
 void init()
          Initializes the servlet by starting a separate thread in which to run the Harvester main program.
 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

init

public void init()
          throws javax.servlet.ServletException
Initializes the servlet by starting a separate thread in which to run the Harvester main program.

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

destroy

public void destroy()
Stops the Harvester thread when the servlet shuts down.

Specified by:
destroy in interface javax.servlet.Servlet


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