dods.servlet.jake
Class DispatchServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bydods.servlet.jake.DispatchServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
DAPServlet, ProxyServlet

public abstract class DispatchServlet
extends javax.servlet.http.HttpServlet

DODS Dispatch servlet. This abstract class preprocesses the query string, simplifying development of DODS servlets.

Version:
$Revision: 1.2 $
Author:
jehamby
See Also:
Serialized Form

Constructor Summary
DispatchServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handle a GET request.
abstract  void getDAS(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String path, java.lang.String ce)
          Get the DODS DAS.
abstract  void getData(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String path, java.lang.String ce, boolean compress)
          Get the DODS Dataset.
abstract  void getDDS(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String path, java.lang.String ce)
          Get the DODS DDS.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DispatchServlet

public DispatchServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
Handle a GET request. This calls the getDAS, getDDS, or getData method, which is implemented by each derived DODS servlet class.

Parameters:
req - HttpServletRequest that encapsulates the request to the servlet
res - HttpServletResponse that encapsulates the response from the servlet
Throws:
java.io.IOException - if detected when handling the request
javax.servlet.ServletException - if the request could not be handled

getDAS

public abstract void getDAS(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res,
                            java.lang.String path,
                            java.lang.String ce)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Get the DODS DAS.

Parameters:
req - the HttpServletRequest to use
res - the HttpServletResponse to use
path - the DODS file path in the URL
ce - the DODS constraint expression in the URL
Throws:
java.io.IOException - if detected when handling the request
javax.servlet.ServletException - if the request could not be handled

getDDS

public abstract void getDDS(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res,
                            java.lang.String path,
                            java.lang.String ce)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Get the DODS DDS.

Parameters:
req - the HttpServletRequest to use
res - the HttpServletResponse to use
path - the DODS file path in the URL
ce - the DODS constraint expression in the URL
Throws:
java.io.IOException - if detected when handling the request
javax.servlet.ServletException - if the request could not be handled

getData

public abstract void getData(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res,
                             java.lang.String path,
                             java.lang.String ce,
                             boolean compress)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Get the DODS Dataset.

Parameters:
req - the HttpServletRequest to use
res - the HttpServletResponse to use
path - the DODS file path in the URL
ce - the DODS constraint expression in the URL
compress - whether to compress the DODS output
Throws:
java.io.IOException - if detected when handling the request
javax.servlet.ServletException - if the request could not be handled