project.biota.servlet
Class DiGIRProviderServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byproject.biota.servlet.DiGIRProviderServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class DiGIRProviderServlet
extends HttpServlet

The servlet of the Biota DiGIR Provider. The servlet delegate all the work to DiGIRRequestHandler to process the DiGIR query.

To plug in a custom servlet to run this application, do the following:
- call BiotaUtils.initializeResources() in the contextInitialized() method of the servet's ServletContextListner class
- invoke the DiGIRRequestHandler.processDiGIRQuery() method whenever the servlet's doPost()/doGet() methods are called during the lifetime of the servlet

Author:
Kimmy Lin
See Also:
DiGIRRequestHandler, Serialized Form

Constructor Summary
DiGIRProviderServlet()
           
 
Method Summary
 void destroy()
          Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Called by the server (via the service method) to allow a servlet to handle a GET request.
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Called by the server (via the service method) to allow a servlet to handle a POST request.
 void init()
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 
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

DiGIRProviderServlet

public DiGIRProviderServlet()
Method Detail

init

public void init()
          throws ServletException
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

Throws:
ServletException - if an exception has occurred that interferes with the servlet's normal operation

destroy

public void destroy()
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.


doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Called by the server (via the service method) to allow a servlet to handle a GET request. It simply calls doPost().

Parameters:
request - the HttpServletRequest received by the servlet
response - the HttpServletResponse of the servlet
Throws:
ServletException - if the request for the GET could not be handled
IOException - if an input or output error is detected when the servlet handles the GET request
See Also:
doPost(HttpServletRequest, HttpServletResponse)

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Called by the server (via the service method) to allow a servlet to handle a POST request. It simply calls DiGIRRequestHandler.processDiGIRQuery() to do the work.

Parameters:
request - the HttpServletRequest received by the servlet
response - the HttpServletResponse of the servlet
Throws:
ServletException - if the request for the POST could not be handled
IOException - if an input or output error is detected when the servlet handles the POST request


Copyright © 2004 University of Massachusetts at Boston. All Rights Reserved.