com.sun.syndication.propono.atom.server
Class AtomServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.sun.syndication.propono.atom.server.AtomServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class AtomServlet
extends HttpServlet

Atom Servlet implements Atom protocol by calling an AtomHandler implementation. This servlet takes care of parsing incoming XML into ROME Atom Entry objects, passing those to the handler and serializing to the response the entries and feeds returned by the handler.

See Also:
Serialized Form

Field Summary
static String FEED_TYPE
          Get feed type support by Servlet, "atom_1.0"
 
Constructor Summary
AtomServlet()
           
 
Method Summary
protected  void doDelete(HttpServletRequest req, HttpServletResponse res)
          Handle Atom DELETE by calling appropriate handler.
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
          Handles an Atom GET by calling handler and writing results to response.
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
          Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
protected  void doPut(HttpServletRequest req, HttpServletResponse res)
          Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.
static String getContextDirPath()
          Get absolute path to Servlet context directory.
 void init(ServletConfig config)
          Initialize servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, 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
 

Field Detail

FEED_TYPE

public static final String FEED_TYPE
Get feed type support by Servlet, "atom_1.0"

See Also:
Constant Field Values
Constructor Detail

AtomServlet

public AtomServlet()
Method Detail

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Handles an Atom GET by calling handler and writing results to response.

Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Handles an Atom POST by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

doPut

protected void doPut(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Handles an Atom PUT by calling handler to identify URI, reading/parsing data, calling handler and writing results to response.

Overrides:
doPut in class HttpServlet
Throws:
ServletException
IOException

doDelete

protected void doDelete(HttpServletRequest req,
                        HttpServletResponse res)
                 throws ServletException,
                        IOException
Handle Atom DELETE by calling appropriate handler.

Overrides:
doDelete in class HttpServlet
Throws:
ServletException
IOException

init

public void init(ServletConfig config)
          throws ServletException
Initialize servlet.

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

getContextDirPath

public static String getContextDirPath()
Get absolute path to Servlet context directory.