com.gisgraphy.servlet
Class GeolocServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.gisgraphy.servlet.GeolocServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GeolocServlet
extends javax.servlet.http.HttpServlet

Provides a servlet Wrapper around The Gisgraphy geoloc Service Map web parameters to create a GeolocQuery

Author:
David Masclet
See Also:
Serialized Form

Field Summary
static int DEFAULT_MAX_RESULTS
           
static java.lang.String FORMAT_PARAMETER
           
static java.lang.String FROM_PARAMETER
           
static java.lang.String INDENT_PARAMETER
           
static java.lang.String LAT_PARAMETER
           
protected static org.slf4j.Logger logger
          The logger
static java.lang.String LONG_PARAMETER
           
static java.lang.String PLACETYPE_PARAMETER
           
static java.lang.String RADIUS_PARAMETER
           
static java.lang.String TO_PARAMETER
           
 
Constructor Summary
GeolocServlet()
           
 
Method Summary
protected  void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doHead(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doOptions(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void doTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void init()
           
 boolean isDebugMode()
           
 void sendCustomError(java.lang.String errorMessage, Output.OutputFormat format, javax.servlet.http.HttpServletResponse resp)
           
 void setDebugMode(boolean debugMode)
           
 void setGeolocSearchEngine(IGeolocSearchEngine geolocSearchEngine)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
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
 

Field Detail

FROM_PARAMETER

public static final java.lang.String FROM_PARAMETER
See Also:
Constant Field Values

TO_PARAMETER

public static final java.lang.String TO_PARAMETER
See Also:
Constant Field Values

FORMAT_PARAMETER

public static final java.lang.String FORMAT_PARAMETER
See Also:
Constant Field Values

PLACETYPE_PARAMETER

public static final java.lang.String PLACETYPE_PARAMETER
See Also:
Constant Field Values

LAT_PARAMETER

public static final java.lang.String LAT_PARAMETER
See Also:
Constant Field Values

LONG_PARAMETER

public static final java.lang.String LONG_PARAMETER
See Also:
Constant Field Values

RADIUS_PARAMETER

public static final java.lang.String RADIUS_PARAMETER
See Also:
Constant Field Values

DEFAULT_MAX_RESULTS

public static final int DEFAULT_MAX_RESULTS
See Also:
Constant Field Values

INDENT_PARAMETER

public static final java.lang.String INDENT_PARAMETER
See Also:
Constant Field Values

logger

protected static final org.slf4j.Logger logger
The logger

Constructor Detail

GeolocServlet

public GeolocServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

sendCustomError

public void sendCustomError(java.lang.String errorMessage,
                            Output.OutputFormat format,
                            javax.servlet.http.HttpServletResponse resp)

doDelete

protected void doDelete(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse resp)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Overrides:
doDelete in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doHead

protected void doHead(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      java.io.IOException
Overrides:
doHead in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doOptions

protected void doOptions(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Overrides:
doOptions in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPut

protected void doPut(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doPut in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doTrace

protected void doTrace(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws javax.servlet.ServletException,
                       java.io.IOException
Overrides:
doTrace in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

setGeolocSearchEngine

public void setGeolocSearchEngine(IGeolocSearchEngine geolocSearchEngine)
Parameters:
geolocSearchEngine - the geolocSearchEngine to set

isDebugMode

public boolean isDebugMode()
Returns:
the debugMode

setDebugMode

public void setDebugMode(boolean debugMode)
Parameters:
debugMode - the debugMode to set


Copyright © 2009. All Rights Reserved.