org.vfny.geoserver.servlets.wms
Class WmsDispatcher

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.vfny.geoserver.servlets.Dispatcher
              extended byorg.vfny.geoserver.servlets.wms.WmsDispatcher
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class WmsDispatcher
extends Dispatcher

Routes requests made at the top-level URI to appropriate interface servlet. Note that the logic of this method could be generously described as 'loose.' It is not checking for request validity in any way (this is done by the reqeust- specific servlets). Rather, it is attempting to make a reasonable guess as to what servlet to call, given that the client is routing to the top level URI as opposed to the request-specific URI, as specified in the GetCapabilities response. Thus, this is a convenience method, which allows for some slight client laziness and helps explain to lost souls/spiders what lives at the URL. Due to the string parsing, it is much faster (and recommended) to use the URIs specified in the GetCapabablities response. Currently does not support post requests, but most requests for this will likely come with get.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.vfny.geoserver.servlets.Dispatcher
DESCRIBE_FEATURE_TYPE_REQUEST, ERROR, GET_CAPABILITIES_REQUEST, GET_FEATURE_LOCK_REQUEST, GET_FEATURE_REQUEST, GET_MAP_REQUEST, LOCK_REQUEST, META_REQUEST, servletConfig, TRANSACTION_REQUEST, UNKNOWN, WFS_SERVICE, WMS_SERVICE
 
Constructor Summary
WmsDispatcher()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles all Get requests.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Passes the Post method to the Get method, with no modifications.
protected  void doResponse(boolean isPost, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int req_type)
           
 
Methods inherited from class org.vfny.geoserver.servlets.Dispatcher
init
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

WmsDispatcher

public WmsDispatcher()
Method Detail

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Passes the Post method to the Get method, with no modifications.

Parameters:
request - The servlet request object.
response - The servlet response object.
Throws:
javax.servlet.ServletException - For any servlet problems.
java.io.IOException - For any io problems.

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Handles all Get requests. This method implements the main matching logic for the class.

Overrides:
doGet in class Dispatcher
Parameters:
request - The servlet request object.
response - The servlet response object.
Throws:
javax.servlet.ServletException - For any servlet problems.
java.io.IOException - For any io problems.

doResponse

protected void doResponse(boolean isPost,
                          javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          int req_type)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException