net.i2p.addressbook
Class Servlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.i2p.addressbook.Servlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Servlet
extends javax.servlet.http.HttpServlet

A wrapper for addressbook to allow it to be started as a web application. This was a GenericServlet, we make it an HttpServlet solely to provide a hook for SusiDNS to wake us up when the subscription list changes.

Author:
Ragnarok
See Also:
Serialized Form

Constructor Summary
Servlet()
           
 
Method Summary
 void destroy()
           
 void init(javax.servlet.ServletConfig config)
           
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Hack to allow susidns to kick the daemon when the subscription list changes.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, 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

Servlet

public Servlet()
Method Detail

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException
Hack to allow susidns to kick the daemon when the subscription list changes. URL must be /addressbook/ with wakeup param set, and nonce param set from system property. (non-Javadoc) see javax.servlet.Servlet#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException

init

public void init(javax.servlet.ServletConfig config)
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet